--- /dev/null
+{% extends "catalogue/lesson/lesson_detail.html" %}
+{% load url from future %}
+
+{% block sidebar-top %}
+
+<section class="box">
+ <h1 class="realisation">Zebrane dla wszystkich tematów</h1>
+
+ <p>To jest materiał wspólny dla wszystkich lekcji
+ edukacji medialnej{% if object.level.slug = "liceum" %}
+ (na poziomie zaawansowanym)
+ {% endif %}.
+ Zobacz też
+ <strong><a href="{% url 'catalogue_lessons' %}">pełny kurs</a></strong>
+ z podziałem na poszczególne tematy.
+ </p>
+</section>
+
+{% endblock %}
--- /dev/null
+{% extends "catalogue/lesson/lesson_detail.html" %}
+{% load url from future %}
+
+{% block sidebar-top %}
+
+<section class="box">
+ <h1 class="realisation">Realizacja i czas lekcji</h1>
+ <p>Ta lekcja jest częścią tematu
+ <a href="{{ object.section.get_absolute_url }}"><strong>{{ object.section }}</strong></a>{% if object.level.slug = "liceum" %}
+ (na poziomie zaawansowanym)
+ {% endif %}.
+ {% with object.get_syntetic as synth %}
+ {% if synth %}
+ Dostępna jest również
+ <strong><a href="{{ object.get_syntetic.get_absolute_url }}">lekcja syntetyczna</a></strong>
+ dla tego tematu.
+ {% endif %}
+ {% endwith %}
+ </p>
+ <p>Czas trwania: 45 minut.</p>
+</section>
+
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load url from future %}
+{% load lesson_link lesson_nav person_list from catalogue_tags %}
+{% load competence curriculum url_for_level from curriculum_tags %}
+
+
+{% block title %}{{ object }}{% endblock %}
+
+{% block body %}
+ <!--h1>{{ object }}</h1-->
+
+<aside id="sidebar">
+ {% block sidebar-top %}{% endblock %}
+
+ <section class="section">
+ {% lesson_nav object %}
+ </section>
+
+ {% if object.dc.relations %}
+ <section class="section-minor">
+ <h1>Powiązane lekcje</h1>
+ <ul class="link-list link-list-colored">
+ {% for uri in object.dc.relations %}
+ <li>{% lesson_link uri %}</li>
+ {% endfor %}
+ </ul>
+ </section>
+ {% endif %}
+
+ {% if object.dc.competences %}
+ <section class="section-minor">
+ <h1>Kompetencje:</h1>
+ <ul class="plain">
+ {% competence object.dc.competences object.level %}
+ </ul>
+ </section>
+ {% endif %}
+
+ {% if object.dc.curriculum %}
+ <section class="section-minor">
+ <h1>Podstawa programowa:</h1>
+ <ul class="plain">
+ {% curriculum object.dc.curriculum %}
+ </ul>
+ </section>
+ {% endif %}
+
+ <section class="section-micro">
+ <h1>Informacje:</h1>
+ <p>
+ {% if object.dc.authors_textbook %}
+ Tekst: {{ object.dc.authors_textbook|person_list }}<br/>
+ {% endif %}
+ {% if object.dc.authors_scenario %}
+ Scenariusz: {{ object.dc.authors_scenario|person_list }}<br/>
+ {% endif %}
+ {% if object.dc.authors_expert %}
+ Konsultacja merytoryczna: {{ object.dc.authors_expert|person_list }}<br/>
+ {% endif %}
+ Licencja: <a href="{{ object.dc.license }}">{{ object.dc.license_description }}</a>.</p>
+ </section>
+
+ <section class="section-micro">
+ <h1>Narzędzia:</h1>
+ <ul class="link-list">
+ <li><a href="{{ object.xml_file.url }}">źródłowy plik XML</a></li>
+ <!--li><a href="{{ object.dc.about }}">lekcja na Platformie Redakcyjnej</a></li-->
+ </ul>
+ </section>
+
+ <section class="section-micro">
+ <p>{{ object.dc.description }}</p>
+ </section>
+
+</aside>
+
+<div id="main-bar">
+{{ object.html_file.read|safe }}
+
+
+<a class="top-link" href="#">wróć na górę</a>
+<footer class="lesson-footer">
+
+{% if object.section %}
+
+<p class="section-info"><a href="{{ object.section.get_absolute_url }}">Temat: {{ object.section }}</a>
+<br/>(<a href="{% url 'catalogue_lessons' %}">spis wszystkich lekcji</a>)</p>
+
+<p>
+{% with object.get_previous as previous %}
+ {% if previous %}
+ <a class="previous-lesson" href="{{ previous.get_absolute_url }}">← {{ previous }}</a>
+ {% endif %}
+{% endwith %}
+
+{% with object.get_next as next %}
+ {% if next %}
+ <a class="next-lesson" href="{{ next.get_absolute_url }}">{{ next }} →</a>
+ {% endif %}
+{% endwith %}
+</p>
+{% endif %}
+
+<div class="clr"></div>
+</footer>
+</div>
+
+{% endblock %}
--- /dev/null
+{% extends "catalogue/lesson/lesson_detail.html" %}
+{% load url from future %}
+
+{% block sidebar-top %}
+
+<section class="box">
+ <h1 class="realisation">Realizacja i czas lekcji</h1>
+ <p>Ta lekcja jest syntezą tematu
+ <strong>{{ object.section }}</strong></a>{% if object.level.slug = "liceum" %}
+ (na poziomie zaawansowanym)
+ {% endif %}.
+ Dostępny jest również
+ <strong><a href="{% url 'catalogue_lessons' %}#{{ object.section.slug }}">pełny kurs</a></strong>
+ tego tematu.
+ </p>
+ <p>Czas trwania: 45 minut.</p>
+</section>
+
+{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load url from future %}
-{% load lesson_link lesson_nav person_list from catalogue_tags %}
-{% load competence curriculum url_for_level from curriculum_tags %}
-
-
-{% block title %}{{ object }}{% endblock %}
-
-{% block body %}
- <!--h1>{{ object }}</h1-->
-
-<aside id="sidebar">
- <section class="box">
- <h1 class="realisation">Realizacja i czas lekcji</h1>
- {% if object.type == 'synthetic' %}
- <p>To lekcja jest syntezą tematu
- <strong>{{ object.section }}</strong></a>{% if object.level.slug = "liceum" %}
- (na poziomie zaawansowanym)
- {% endif %}.
- Dostępny jest również
- <strong><a href="{% url 'catalogue_lessons' %}#{{ object.section.slug }}">pełny kurs</a></strong>
- tego tematu.
- </p>
- <p>Czas trwania: 45 minut.</p>
- {% elif object.type == 'course' %}
- <p>Ta lekcja jest częścią tematu
- <a href="{{ object.section.get_absolute_url }}"><strong>{{ object.section }}</strong></a>{% if object.level.slug = "liceum" %}
- (na poziomie zaawansowanym)
- {% endif %}.
- {% with object.get_syntetic as synth %}
- {% if synth %}
- Dostępna jest również
- <strong><a href="{{ object.get_syntetic.get_absolute_url }}">lekcja syntetyczna</a></strong>
- dla tego tematu.
- {% endif %}
- {% endwith %}
- </p>
- <p>Czas trwania: 45 minut.</p>
- {% else %}
- <p>?</p>
- {% endif %}
- </section>
-
- {% if object.package %}
- <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz całą lekcję</a></section>
- {% endif %}
- {% if object.student_package %}
- <section><a href="{{ object.student_package.url }}" class="dl-button">Pobierz lekcję w wersji dla ucznia</a></section>
- {% endif %}
-
- <section class="section">
- {% lesson_nav object %}
- </section>
-
- {% if object.dc.relations %}
- <section class="section-minor">
- <h1>Powiązane lekcje</h1>
- <ul class="link-list link-list-colored">
- {% for uri in object.dc.relations %}
- <li>{% lesson_link uri %}</li>
- {% endfor %}
- </ul>
- </section>
- {% endif %}
-
- {% if object.dc.competences %}
- <section class="section-minor">
- <h1>Kompetencje:</h1>
- <ul class="plain">
- {% competence object.dc.competences object.level %}
- </ul>
- </section>
- {% endif %}
-
- {% if object.dc.curriculum %}
- <section class="section-minor">
- <h1>Podstawa programowa:</h1>
- <ul class="plain">
- {% curriculum object.dc.curriculum %}
- </ul>
- </section>
- {% endif %}
-
- <section class="section-micro">
- <h1>Informacje:</h1>
- <p>
- {% if object.dc.authors_textbook %}
- Tekst: {{ object.dc.authors_textbook|person_list }}<br/>
- {% endif %}
- {% if object.dc.authors_scenario %}
- Scenariusz: {{ object.dc.authors_scenario|person_list }}<br/>
- {% endif %}
- {% if object.dc.authors_expert %}
- Konsultacja merytoryczna: {{ object.dc.authors_expert|person_list }}<br/>
- {% endif %}
- Licencja: <a href="{{ object.dc.license }}">{{ object.dc.license_description }}</a>.</p>
- </section>
-
- <section class="section-micro">
- <h1>Narzędzia:</h1>
- <ul class="link-list">
- <li><a href="{{ object.xml_file.url }}">źródłowy plik XML</a></li>
- <!--li><a href="{{ object.dc.about }}">lekcja na Platformie Redakcyjnej</a></li-->
- </ul>
- </section>
-
- <section class="section-micro">
- <p>{{ object.dc.description }}</p>
- </section>
-
-</aside>
-
-<div id="main-bar">
-{{ object.html_file.read|safe }}
-
-
-<a class="top-link" href="#">wróć na górę</a>
-<footer class="lesson-footer">
-
-{% if object.section %}
-
-<p class="section-info"><a href="{{ object.section.get_absolute_url }}">Temat: {{ object.section }}</a>
-<br/>(<a href="{% url 'catalogue_lessons' %}">spis wszystkich lekcji</a>)</p>
-
-<p>
-{% with object.get_previous as previous %}
- {% if previous %}
- <a class="previous-lesson" href="{{ previous.get_absolute_url }}">← {{ previous }}</a>
- {% endif %}
-{% endwith %}
-
-{% with object.get_next as next %}
- {% if next %}
- <a class="next-lesson" href="{{ next.get_absolute_url }}">{{ next }} →</a>
- {% endif %}
-{% endwith %}
-</p>
-{% endif %}
-
-<div class="clr"></div>
-</footer>
-</div>
-
-{% endblock %}
<section class="box-button"><a href="{{ package_url }}" class="dl-button">Pobierz wszystkie lekcje</a></section>
<section><a href="{{ package_student_url }}" class="dl-button">Pobierz wszystkie lekcje w wersji dla ucznia</a></section>
<section class="section-minor">
- <h1>Zebrane z wszystkich działów</h1>
+ <h1>Zebrane dla wszystkich tematów</h1>
<ul class="link-list">
{% for lesson in appendix %}
<li><a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a></li>
from django.conf.urls import patterns, include, url
-from django.views.generic import DetailView, ListView
-from .models import Section, Lesson
-from .views import SectionView
+from .views import SectionView, LessonView
urlpatterns = patterns('',
url(r'^$',
SectionView.as_view(),
name="catalogue_lessons"),
url(r'^(?P<slug>[^/]+)/$',
- DetailView.as_view(model=Lesson),
+ LessonView.as_view(),
name="catalogue_lesson"),
)
from django.views.generic import DetailView, ListView
from .models import Lesson, Section
+
class SectionView(ListView):
model = Section
context['package_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE)
context['package_student_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE_STUDENT)
return context
+
+
+class LessonView(DetailView):
+ model = Lesson
+
+ def get_template_names(self):
+ return [
+ 'catalogue/lesson/%s/lesson_detail.html' % self.object.type,
+ 'catalogue/lesson/lesson_detail.html',
+ ]
+
--- /dev/null
+from django.contrib import admin
+
+from chunks.models import Chunk, Attachment
+
+
+class ChunkAdmin(admin.ModelAdmin):
+ list_display = ('key', 'description',)
+ search_fields = ('key', 'content',)
+
+admin.site.register(Chunk, ChunkAdmin)
+
+
+class AttachmentAdmin(admin.ModelAdmin):
+ list_display = ('key',)
+ search_fields = ('key',)
+
+admin.site.register(Attachment, AttachmentAdmin)
\ No newline at end of file
--- /dev/null
+[
+ {
+ "pk": "document-list",
+ "model": "chunks.chunk",
+ "fields": {
+ "content": " <p>Zasoby szkolnej biblioteki internetowej Wolne Lektury oraz jej funkcjonalno\u015bci wykorzystywane s\u0105 przez nauczycieli i nauczycielki podczas pracy w szkole. Poni\u017cej znajduj\u0105 si\u0119 materia\u0142y edukacyjne \u2013 scenariusze lekcji, tematy wypracowa\u0144 i inne \u2013 stworzone przez pedagog\u00f3w, kt\u00f3rzy w swojej codziennej pracy w szkole wykorzystuj\u0105 przygotowane przez nas narz\u0119dzia i opracowane merytorycznie teksty.</p>\r\n\r\n<ol>\r\n<li><strong>Scenariusze lekcji</strong>\r\n\r\n <ul>\r\n <li><a href=\"/materialy/kot-w-literaturze-scenariusz-lekcji/\" data-hash=\"#kot-w-literaturze-scenariusz-lekcji\">Scenariusz lekcji. Kot w literaturze.</a> <a class='download-doc' href=\"/media/lessons/document/wolnelektury-kot-scenariusz.doc\">Pobierz dokument</a></li>\r\n <li><a href=\"/materialy/lekcja-multimedialna-danse-macabre/\" data-hash=\"#lekcja-multimedialna-danse-macabre\">Lekcja multimedialna - Motyw danse macabre wyst\u0119puj\u0105cy w tekstach kultury. </a><a class='download-doc' href=\"/media/lessons/document/wolnelektury-lekcja.multimedialna-danse.macabre_.ppt\">Pobierz prezentacj\u0119</a></li>\r\n <li><a href=\"/materialy/lekcja-multimedialna-sonet/\" data-hash=\"#lekcja-multimedialna-sonet\">R\u00f3\u017cnorodno\u015b\u0107 tematyczna sonetu.</a><a class='download-doc' href=\"/media/lessons/document/wolnelektury-lekcja.multimedialna-sonet.ppt\">Pobierz dokument</a></li>\r\n <li><a href=\"/materialy/slowacki-czesc-i/\" data-hash=\"#slowacki-czesc-i\">\u201eBo to jest wieszcza najja\u015bniejsza chwa\u0142a\u2026\u201d Juliusz S\u0142owacki - cz\u0142owiek i poeta</a> <a class='download-doc' href=\"/media/lessons/document/wolnelektury-slowacki01.ppt\">Pobierz prezentacj\u0119</a></li>\r\n <li><a href=\"/materialy/usmiech-i-lzy-wieszcza/\" data-hash=\"#usmiech-i-lzy-wieszcza\">U\u015bmiech i \u0142zy wieszcza czyli S\u0142owacki p\u00f3\u0142 \u017cartem, p\u00f3\u0142 serio.</a> <a class='download-doc' href=\"/media/lessons/document/wolnelektury-usmiech.i.lzy.wieszcza.ppt\">Pobierz prezentacj\u0119</a></li>\r\n\r\n</ul>\r\n</li>\r\n\r\n<li><a href=\"/materialy/przyklady-zadan/\" data-hash=\"#przyklady-zadan\">Przyk\u0142ady zada\u0144 do opracowania przez zespo\u0142y uczni\u00f3w</a> <a class='download-doc' href=\"/media/lessons/document/wolnelektury-przyklady.zadan.doc\">Pobierz dokument</a></li>\r\n<li><a href=\"/materialy/tematy-wypracowan/\" data-hash=\"#tematy-wypracowan\">Tematy wypracowa\u0144</a> <a class='download-doc' href=\"/media/lessons/document/wolne.lektury-tematy.wypracowan.doc\">Pobierz dokument</a></li>\r\n<li><a href=\"/materialy/repetytorium-maturalne/\" data-hash=\"#repetytorium-maturalne\">Repetytorium maturalne.</a> <a class='download-doc' href=\"/media/lessons/document/wolnelektury-repetytorium.maturalne.ppt\">Pobierz prezentacj\u0119</a></li>\r\n\r\n</ol>\r\n</p>\r\n\r\n<p>Zach\u0119camy wszystkich nauczycieli i wszystkie nauczycielki do tworzenia materia\u0142\u00f3w edukacyjnych i publikowania ich na naszej stronie! Warto zapozna\u0107 si\u0119 z <a href=\"/materialy/tworzenie-scenariuszy-lekcji/\" data-hash=\"#tworzenie-scenariuszy-lekcji\">instrukcj\u0105 dotycz\u0105c\u0105 pisania scenariuszy lekcji</a> i <a href=\"/materialy/schemat-scenariusza-lekcji/\" data-hash=\"#schemat-scenariusza-lekcji\">schematem przyk\u0142adowego scenariusza lekcji</a>, a gotowe materia\u0142y przes\u0142a\u0107 na adres <a href=\"mailto:fundacja@nowoczesnapolska.org.pl\">fundacja@nowoczesnapolska.org.pl</a>.</p>",
+ "description": ""
+ }
+ },
+ {
+ "pk": "footer-map",
+ "model": "chunks.chunk",
+ "fields": {
+ "content": "<AREA SHAPE=\"rect\" COORDS=\"104,83,261,101\" HREF=\"http://edukacja.gazeta.pl\" ALT=\"GazetaEdukacja.pl - matura, testy, egzaminy, studia\" TITLE=\"GazetaEdukacja.pl - matura, testy, egzaminy, studia\"><AREA SHAPE=\"rect\" COORDS=\"539,38,656,73\" ALT=\"Kurier Wile\u0144ski\" HREF=\"http://www.kurierwilenski.lt/\"><AREA SHAPE=\"rect\" COORDS=\"687,81,789,116\" ALT=\"Radio znad Wilii\" HREF=\"http://www.znadwilii.lt\"><AREA SHAPE=\"rect\" COORDS=\"376,34,520,75\" ALT=\"Ministerstwo Edukacji Narodowej\" HREF=\"http://www.men.gov.pl/\"><AREA SHAPE=\"rect\" COORDS=\"761,59,822,77\" ALT=\"Biblioteka Analiz\" HREF=\"http://www.rynek-ksiazki.pl/\"><AREA SHAPE=\"rect\" COORDS=\"734,55,759,76\" ALT=\"Przekr\u00f3j\" HREF=\"http://www.przekroj.pl/\"><AREA SHAPE=\"rect\" COORDS=\"695,55,732,76\" ALT=\"TVP Kultura\" HREF=\"http://www.tvp.pl/tvpkultura/\"><AREA SHAPE=\"rect\" COORDS=\"762,35,821,59\" ALT=\"Elle\" HREF=\"http://elle.interia.pl/\"><AREA SHAPE=\"rect\" COORDS=\"659,55,693,77\" ALT=\"Radio TOK.FM\" HREF=\"http://www.tok.fm/\"><AREA SHAPE=\"rect\" COORDS=\"658,35,760,53\" ALT=\"Tygodnik Powszechny\" HREF=\"http://tygodnik.onet.pl/\"><AREA SHAPE=\"rect\" COORDS=\"265,35,366,74\" ALT=\"Ministerstwo Kultury i Dziedzictwa Narodowego\" HREF=\"http://www.mkidn.gov.pl/\"><AREA SHAPE=\"rect\" COORDS=\"222,29,261,83\" ALT=\"Biblioteka Narodowa\" HREF=\"http://www.bn.org.pl/\"><AREA SHAPE=\"rect\" COORDS=\"188,58,217,81\" ALT=\"PZL\" HREF=\"http://www.pzl.pl/\"><AREA SHAPE=\"rect\" COORDS=\"162,32,218,56\" ALT=\"eo Networks - administracja, zarz\u0105dzanie serwerami, technologie Sun,\r\nlinux, bsd, unix, solaris\" HREF=\"http://eo.pl/\"><AREA SHAPE=\"rect\" COORDS=\"104,61,184,76\" ALT=\"Kancelaria Prawna Grynhoff Wo\u017any Mali\u0144ski Sp\u00f3\u0142ka komandytowa\" HREF=\"http://www.gww.pl/\"><AREA SHAPE=\"rect\" COORDS=\"104,35,160,60\" ALT=\"Information is art\" HREF=\"http://www.informationisart.com/\"><AREA SHAPE=\"rect\" COORDS=\"15,39,98,75\" ALT=\"Fundacja Nowoczesna Polska\" HREF=\"http://nowoczesnapolska.org.pl/\"><AREA SHAPE=\"default\" COORDS=\"0,0,860,120\" NOHREF>",
+ "description": ""
+ }
+ },
+ {
+ "pk": "site-description",
+ "model": "chunks.chunk",
+ "fields": {
+ "content": "",
+ "description": ""
+ }
+ },
+ {
+ "pk": "top-message",
+ "model": "chunks.chunk",
+ "fields": {
+ "content": "",
+ "description": ""
+ }
+ },
+ {
+ "pk": "footer-img",
+ "model": "chunks.attachment",
+ "fields": {
+ "attachment": "chunks/attachment/footer.png"
+ }
+ }
+]
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-04-11 22:56+0100\n"
+"Last-Translator: Kamil <kjaklukowski@gmail.com>\n"
+"Language-Team: \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "Schlüssel"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "Die einzigartige Bezeichnung für dieses Chunk von Inhalten"
+
+#: models.py:12
+msgid "description"
+msgstr "Beschreibung"
+
+#: models.py:13
+msgid "content"
+msgstr "Inhalt"
+
+#: models.py:17
+msgid "chunk"
+msgstr "Chunk"
+
+#: models.py:18
+msgid "chunks"
+msgstr "Chunks"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "Die einzigartige Bezeichnung für diese Beilage"
+
+#: models.py:38
+msgid "attachment"
+msgstr "Beilage"
+
+#: models.py:38
+msgid "attachments"
+msgstr "Beilagen"
+
+#~ msgid "title"
+#~ msgstr "Titel"
+
+#~ msgid "slug"
+#~ msgstr "Slug"
+
+#~ msgid "file"
+#~ msgstr "Datei"
+
+#~ msgid "author"
+#~ msgstr "Autor"
+
+#~ msgid "slideshare ID"
+#~ msgstr "Dia-ID"
+
+#~ msgid "HTML"
+#~ msgstr "HTML"
+
+#~ msgid "document"
+#~ msgstr "Dokument"
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-03-04 20:05+0100\n"
+"Last-Translator: xxx <xxx>\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"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "key"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "A unique name for this piece of content"
+
+#: models.py:12
+msgid "description"
+msgstr "description"
+
+#: models.py:13
+msgid "content"
+msgstr "content"
+
+#: models.py:17
+msgid "chunk"
+msgstr "piece"
+
+#: models.py:18
+msgid "chunks"
+msgstr "pieces"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "A unique name for this attachment"
+
+#: models.py:38
+msgid "attachment"
+msgstr "attachment"
+
+#: models.py:38
+msgid "attachments"
+msgstr "attachments"
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-02-18 13:02+0100\n"
+"Last-Translator: Anna Jopp <aniajopp@gmail.com>\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"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "clave"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "El nombre único para este elemento del contenido"
+
+#: models.py:12
+msgid "description"
+msgstr "descripción"
+
+#: models.py:13
+msgid "content"
+msgstr "contenido"
+
+#: models.py:17
+msgid "chunk"
+msgstr "elemento"
+
+#: models.py:18
+msgid "chunks"
+msgstr "elementos"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "El nombre único para este archivo adjunto"
+
+#: models.py:38
+msgid "attachment"
+msgstr "archivo adjunto"
+
+#: models.py:38
+msgid "attachments"
+msgstr "archivos adjuntos"
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-02-22 20:52+0100\n"
+"Last-Translator: Ela Janota <amarillis5@wp.pl>\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"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "clé"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "Un nom unique pour ce fragment du contenu"
+
+#: models.py:12
+msgid "description"
+msgstr "description"
+
+#: models.py:13
+msgid "content"
+msgstr "contenu"
+
+#: models.py:17
+msgid "chunk"
+msgstr "fragment"
+
+#: models.py:18
+msgid "chunks"
+msgstr "fragments"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "Un nom unique pour cette pièce jointe"
+
+#: models.py:38
+msgid "attachment"
+msgstr "pièce jointe"
+
+#: models.py:38
+msgid "attachments"
+msgstr "pièces jointes"
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-02-21 16:52+0100\n"
+"Last-Translator: xxx\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=2; plural=(n != 1)\n"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "Chiave"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "un nome unico per questo allegato"
+
+#: models.py:12
+msgid "description"
+msgstr "descrizione"
+
+#: models.py:13
+msgid "content"
+msgstr "contenuto"
+
+#: models.py:17
+msgid "chunk"
+msgstr "blocco"
+
+#: models.py:18
+msgid "chunks"
+msgstr "blocchi"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "Un nome unico per questo allegato"
+
+#: models.py:38
+msgid "attachment"
+msgstr "allegato"
+
+#: models.py:38
+msgid "attachments"
+msgstr "allegati"
--- /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: 2012-07-19 11:39+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"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr ""
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr ""
+
+#: models.py:12
+msgid "description"
+msgstr ""
+
+#: models.py:13
+msgid "content"
+msgstr ""
+
+#: models.py:17
+msgid "chunk"
+msgstr ""
+
+#: models.py:18
+msgid "chunks"
+msgstr ""
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr ""
+
+#: models.py:38
+msgid "attachment"
+msgstr ""
+
+#: models.py:38
+msgid "attachments"
+msgstr ""
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-03-01 16:13+0100\n"
+"Last-Translator: Aneta\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"
+"X-Translated-Using: django-rosetta 0.5.3\n"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "raktas"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "Unikalus šio turinio gabalo pavadnimas"
+
+#: models.py:12
+msgid "description"
+msgstr "aprašymas"
+
+#: models.py:13
+msgid "content"
+msgstr "turinys"
+
+#: models.py:17
+msgid "chunk"
+msgstr "gabalas"
+
+#: models.py:18
+msgid "chunks"
+msgstr "gabalai"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "Unikalus šio priedo pavadnimas"
+
+#: models.py:38
+msgid "attachment"
+msgstr "priedas"
+
+#: models.py:38
+msgid "attachments"
+msgstr "priedai"
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2010-05-19 16:19\n"
+"Last-Translator: <radoslaw.czajka@nowoczesnapolska.org.pl>\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"
+"X-Translated-Using: django-rosetta 0.5.3\n"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "klucz"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "Unikalna nazwa dla tego kawałka treści"
+
+#: models.py:12
+msgid "description"
+msgstr "opis"
+
+#: models.py:13
+msgid "content"
+msgstr "zawartość"
+
+#: models.py:17
+msgid "chunk"
+msgstr "kawałek"
+
+#: models.py:18
+msgid "chunks"
+msgstr "kawałki"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "Unikalna nazwa dla tego załącznika"
+
+#: models.py:38
+msgid "attachment"
+msgstr "załącznik"
+
+#: models.py:38
+msgid "attachments"
+msgstr "załączniki"
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-03-04 22:10+0100\n"
+"Last-Translator: xxx <xxx>\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"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "ключ"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "Уникальное имя для этого фрагмента содержания"
+
+#: models.py:12
+msgid "description"
+msgstr "описание"
+
+#: models.py:13
+msgid "content"
+msgstr "содержание"
+
+#: models.py:17
+msgid "chunk"
+msgstr "фрагмент"
+
+#: models.py:18
+msgid "chunks"
+msgstr "фрагменты"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "Уникальное имя для этого приложения"
+
+#: models.py:38
+msgid "attachment"
+msgstr "приложение"
+
+#: models.py:38
+msgid "attachments"
+msgstr "приложения"
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-19 11:39+0200\n"
+"PO-Revision-Date: 2012-03-04 17:29+0100\n"
+"Last-Translator: xxx <xxx>\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"
+
+#: models.py:11 models.py:33
+msgid "key"
+msgstr "ключ"
+
+#: models.py:11
+msgid "A unique name for this chunk of content"
+msgstr "Унікальна назва для цієї частини змісту"
+
+#: models.py:12
+msgid "description"
+msgstr "опис"
+
+#: models.py:13
+msgid "content"
+msgstr "зміст"
+
+#: models.py:17
+msgid "chunk"
+msgstr "частина"
+
+#: models.py:18
+msgid "chunks"
+msgstr "частини"
+
+#: models.py:33
+msgid "A unique name for this attachment"
+msgstr "Унікальна назва для цього додатку"
+
+#: models.py:38
+msgid "attachment"
+msgstr "додаток"
+
+#: models.py:38
+msgid "attachments"
+msgstr "додатки"
--- /dev/null
+from django.core.cache import cache
+from django.db import models
+from django.utils.translation import ugettext_lazy as _
+
+
+class Chunk(models.Model):
+ """
+ A Chunk is a piece of content associated with a unique key that can be inserted into
+ any template with the use of a special template tag.
+ """
+ key = models.CharField(_('key'), help_text=_('A unique name for this chunk of content'), primary_key=True, max_length=255)
+ description = models.CharField(_('description'), blank=True, max_length=255)
+ content = models.TextField(_('content'), blank=True)
+
+ class Meta:
+ ordering = ('key',)
+ verbose_name = _('chunk')
+ verbose_name_plural = _('chunks')
+
+ def __unicode__(self):
+ return self.key
+
+ def cache_key(self):
+ return 'chunk_' + self.key
+
+ def save(self, *args, **kwargs):
+ ret = super(Chunk, self).save(*args, **kwargs)
+ cache.delete(self.cache_key())
+ return ret
+
+
+class Attachment(models.Model):
+ key = models.CharField(_('key'), help_text=_('A unique name for this attachment'), primary_key=True, max_length=255)
+ attachment = models.FileField(upload_to='chunks/attachment')
+
+ class Meta:
+ ordering = ('key',)
+ verbose_name, verbose_name_plural = _('attachment'), _('attachments')
+
+ def __unicode__(self):
+ return self.key
+
--- /dev/null
+from django import template
+from django.db import models
+from django.core.cache import cache
+
+
+register = template.Library()
+
+Chunk = models.get_model('chunks', 'chunk')
+Attachment = models.get_model('chunks', 'attachment')
+
+
+def do_get_chunk(parser, token):
+ # split_contents() knows not to split quoted strings.
+ tokens = token.split_contents()
+ if len(tokens) < 2 or len(tokens) > 3:
+ raise template.TemplateSyntaxError, "%r tag should have either 2 or 3 arguments" % (tokens[0],)
+ if len(tokens) == 2:
+ tag_name, key = tokens
+ cache_time = 0
+ if len(tokens) == 3:
+ tag_name, key, cache_time = tokens
+ # Check to see if the key is properly double/single quoted
+ if not (key[0] == key[-1] and key[0] in ('"', "'")):
+ raise template.TemplateSyntaxError, "%r tag's argument should be in quotes" % tag_name
+ # Send key without quotes and caching time
+ return ChunkNode(key[1:-1], cache_time)
+
+
+class ChunkNode(template.Node):
+ def __init__(self, key, cache_time=0):
+ self.key = key
+ self.cache_time = cache_time
+
+ def render(self, context):
+ try:
+ cache_key = 'chunk_' + self.key
+ c = cache.get(cache_key)
+ if c is None:
+ c = Chunk.objects.get(key=self.key)
+ cache.set(cache_key, c, int(self.cache_time))
+ content = c.content
+ except Chunk.DoesNotExist:
+ n = Chunk(key=self.key)
+ n.save()
+ return ''
+ return content
+
+register.tag('chunk', do_get_chunk)
+
+
+def attachment(key, cache_time=0):
+ try:
+ cache_key = 'attachment_' + key
+ c = cache.get(cache_key)
+ if c is None:
+ c = Attachment.objects.get(key=key)
+ cache.set(cache_key, c, int(cache_time))
+ return c.attachment.url
+ except Attachment.DoesNotExist:
+ return ''
+
+register.simple_tag(attachment)
+
'django_cas',
'sponsors',
'haystack',
+ 'chunks',
'django.contrib.auth',
padding: 1.5em 1.25em;
width: 11.25em;
height: 11.688em; }
+ #main-promobox a {
+ display: block; }
#main-promobox h1 {
color: white;
margin: 0;
width: 220*$px - 2 * 20*$px;
height: 235*$px - 2 * 1.5em;
+ a {
+ display: block;
+ }
h1 {
color: white;
margin: 0;
{% extends "base.html" %}
{% load catalogue_tags %}
{% load course_boxes_toc from curriculum_tags %}
+{% load chunk from chunks %}
{% block full_title %}Edukacja medialna{% endblock %}
<section id="main-promobox">
<h1>Co nowego?</h1>
-<h2>Tytuł informacji pierwszej</h2>
-
-<p>Boks na informacje powinien pomieścić do dwóch krótkich zdań ułożonych
-w trzech, a może…</p>
-
-<h2>Tytuł informacji drugiej</h2>
-
-<p>Boks na informacje powinien pomieścić do dwóch krótkich zdań ułożonych
-w trzech wierszach?</p>
-{#% chunk "promobox" %#}
+{% chunk "promobox" %}
</section>
<section id="main-sections">
<section class="main-tools-box">
<h1>Narzędzia</h1>
+<ul class="link-list">
+ <li><a href="{{ package_url }}">Pobierz wszystkie lekcje</a></li>
+ <li><a href="{{ package_student_url }}">Pobierz wszystkie lekcje w wersji dla ucznia</a></li>
+</ul>
</section>
<div style="clear:both"></div>
from django.conf.urls import patterns, include, url
from django.conf import settings
-from django.views.generic import TemplateView
+from .views import HomeView
urlpatterns = patterns('',
- # Examples:
- # url(r'^$', 'edumed.views.home', name='home'),
- url(r'^$', TemplateView.as_view(template_name="home.html"), name="home"),
+ url(r'^$', HomeView.as_view(), name="home"),
url(r'^kompetencje/', include('curriculum.urls')),
url(r'^lekcje/', include('catalogue.urls')),
# url(r'^i/', include('django.contrib.flatpages.urls')),
+import os.path
+from django.conf import settings
+from django.views.generic import TemplateView
+
+class HomeView(TemplateView):
+ template_name="home.html"
+
+ def get_context_data(self, **kwargs):
+ context = super(HomeView, self).get_context_data(**kwargs)
+ context['package_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE)
+ context['package_student_url'] = os.path.join(settings.MEDIA_URL, settings.CATALOGUE_PACKAGE_STUDENT)
+ return context