--- /dev/null
+from django.contrib import admin\r
+\r
+from libraries.models import Library\r
+\r
+\r
+admin.site.register(Library)
\ No newline at end of file
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-05-06 15:42+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+
+#: models.py:8
+msgid "name"
+msgstr "nazwa"
+
+#: models.py:9
+msgid "url"
+msgstr "url"
+
+#: models.py:10
+msgid "description"
+msgstr "opis"
+
+#: models.py:13
+msgid "library"
+msgstr "biblioteka"
+
+#: models.py:14
+msgid "libraries"
+msgstr "biblioteki"
+
+#: templates/libraries/main_view.html:4 templates/libraries/main_view.html:8
+msgid "Libraries directory"
+msgstr "Katalog bibliotek"
--- /dev/null
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'Library'
+ db.create_table(u'libraries_library', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)),
+ ('url', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)),
+ ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
+ ))
+ db.send_create_signal(u'libraries', ['Library'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'Library'
+ db.delete_table(u'libraries_library')
+
+
+ models = {
+ u'libraries.library': {
+ 'Meta': {'object_name': 'Library'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}),
+ 'url': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['libraries']
\ No newline at end of file
--- /dev/null
+from django.db import models\r
+from django.utils.translation import ugettext_lazy as _\r
+\r
+class Library(models.Model):\r
+ """Represent a single library in the libraries dictionary"""\r
+\r
+ #slug = models.SlugField(_('slug'), max_length=120, unique=True, db_index=True)\r
+ name = models.CharField(_('name'), max_length=120, blank=True)
+ url = models.CharField(_('url'), max_length=120, blank=True)
+ description = models.TextField(_('description'), blank=True)\r
+\r
+ class Meta:\r
+ verbose_name = _('library')\r
+ verbose_name_plural = _('libraries')\r
+\r
+ def __unicode__(self):\r
+ return self.name\r
+\r
+ @models.permalink\r
+ def get_absolute_url(self):\r
+ return ('infopage', [self.slug])\r
--- /dev/null
+.libraries-list {\r
+ margin: 10px 0;\r
+}\r
+\r
+.libraries-list-item {\r
+ margin: 10px 0;\r
+}
+
+.libraries-list-item {
+ margin: 10px 0;
+ font-size: 1.3em;
+}
+
+.libraries-list-item-header {
+ font-size: 1.2em;
+}
\ No newline at end of file
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block titleextra %}{% trans 'Libraries directory' %}{% endblock %}
+
+
+{% block body %}
+ <h1>{% trans 'Libraries directory' %}</h1>
+
+ <div class="libraries-list">
+ {% for library in libraries %}
+ <div class="libraries-list-item">
+ <div class="libraries-list-item-header"><a href="{{library.url}}">{{library.name}}</a></div>
+ <div class="libraries-list-item-description">
+
+ {% autoescape off %}{{library.description}}{% endautoescape%}
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+
+{% endblock %}
\ No newline at end of file
--- /dev/null
+from django.conf.urls.defaults import *
+
+
+urlpatterns = patterns('libraries.views',
+ url(r'^$', 'main_view', name='libraries_main_view'),
+)
\ No newline at end of file
--- /dev/null
+from django.shortcuts import render_to_response, get_object_or_404\r
+from django.template import RequestContext, Template, TemplateSyntaxError\r
+\r
+from libraries.models import Library\r
+\r
+\r
+def main_view(request):\r
+ context = RequestContext(request)
+ context['libraries'] = Library.objects.all()\r
+\r
+ return render_to_response('libraries/main_view.html', context_instance = context)
\ No newline at end of file
'waiter',
'search',
'oai',
+ 'libraries',
]
INSTALLED_APPS_CONTRIB = [
'css/catalogue.css',
'sponsors/css/sponsors.css',
'css/auth.css',
+ 'libraries/libraries.css',
'css/social/shelf_tags.css',
'css/ui-lightness/jquery-ui-1.8.16.custom.css',
url(r'^ludzie/', include('social.urls')),
url(r'^uzytkownik/', include('allauth.urls')),
url(r'^czekaj/', include('waiter.urls')),
+ url(r'^biblioteki/', include('libraries.urls')),
# Admin panel
url(r'^admin/catalogue/book/import$', 'catalogue.views.import_book', name='import_book'),