Register form info is a chunk.
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 11 Oct 2012 10:14:13 +0000 (12:14 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 11 Oct 2012 10:14:13 +0000 (12:14 +0200)
35 files changed:
chunks/__init__.py [new file with mode: 0644]
chunks/admin.py [new file with mode: 0644]
chunks/locale/de/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/de/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/en/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/en/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/es/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/es/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/fr/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/fr/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/it/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/it/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/jp/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/jp/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/lt/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/lt/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/pl/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/pl/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/ru/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/ru/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/locale/uk/LC_MESSAGES/django.mo [new file with mode: 0644]
chunks/locale/uk/LC_MESSAGES/django.po [new file with mode: 0644]
chunks/migrations/0001_initial.py [new file with mode: 0644]
chunks/migrations/__init__.py [new file with mode: 0644]
chunks/models.py [new file with mode: 0644]
chunks/templatetags/__init__.py [new file with mode: 0644]
chunks/templatetags/chunks.py [new file with mode: 0644]
contact/templates/contact/form.html
prawokultury/settings.d/30-apps.conf
prawokultury/static/css/base.css
prawokultury/static/css/base.scss
prawokultury/static/css/forms.css
prawokultury/static/css/forms.scss
prawokultury/static/css/header.css
prawokultury/templates/contact/register/form.html

diff --git a/chunks/__init__.py b/chunks/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/chunks/admin.py b/chunks/admin.py
new file mode 100644 (file)
index 0000000..fc45cb7
--- /dev/null
@@ -0,0 +1,17 @@
+from django.contrib import admin
+from fnpdjango.utils.models.translation import translated_fields
+from .models import Chunk, Attachment
+
+
+class ChunkAdmin(admin.ModelAdmin):
+    list_display = ('key', 'description',)
+    search_fields = ('key', ) + translated_fields(('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
diff --git a/chunks/locale/de/LC_MESSAGES/django.mo b/chunks/locale/de/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..be5f8ae
Binary files /dev/null and b/chunks/locale/de/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/de/LC_MESSAGES/django.po b/chunks/locale/de/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..7fbf84e
--- /dev/null
@@ -0,0 +1,74 @@
+# 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"
diff --git a/chunks/locale/en/LC_MESSAGES/django.mo b/chunks/locale/en/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..a81e430
Binary files /dev/null and b/chunks/locale/en/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/en/LC_MESSAGES/django.po b/chunks/locale/en/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..e81d48a
--- /dev/null
@@ -0,0 +1,53 @@
+# 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"
diff --git a/chunks/locale/es/LC_MESSAGES/django.mo b/chunks/locale/es/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..83f03fb
Binary files /dev/null and b/chunks/locale/es/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/es/LC_MESSAGES/django.po b/chunks/locale/es/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..4130ea1
--- /dev/null
@@ -0,0 +1,53 @@
+# 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"
diff --git a/chunks/locale/fr/LC_MESSAGES/django.mo b/chunks/locale/fr/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..1ef6af2
Binary files /dev/null and b/chunks/locale/fr/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/fr/LC_MESSAGES/django.po b/chunks/locale/fr/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..150a92c
--- /dev/null
@@ -0,0 +1,53 @@
+# 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"
diff --git a/chunks/locale/it/LC_MESSAGES/django.mo b/chunks/locale/it/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..a07410f
Binary files /dev/null and b/chunks/locale/it/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/it/LC_MESSAGES/django.po b/chunks/locale/it/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..4598d53
--- /dev/null
@@ -0,0 +1,54 @@
+# 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"
diff --git a/chunks/locale/jp/LC_MESSAGES/django.mo b/chunks/locale/jp/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..ad2faa7
Binary files /dev/null and b/chunks/locale/jp/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/jp/LC_MESSAGES/django.po b/chunks/locale/jp/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..dcc303c
--- /dev/null
@@ -0,0 +1,54 @@
+# 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 ""
diff --git a/chunks/locale/lt/LC_MESSAGES/django.mo b/chunks/locale/lt/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..6131fd5
Binary files /dev/null and b/chunks/locale/lt/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/lt/LC_MESSAGES/django.po b/chunks/locale/lt/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..a78804a
--- /dev/null
@@ -0,0 +1,54 @@
+# 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"
diff --git a/chunks/locale/pl/LC_MESSAGES/django.mo b/chunks/locale/pl/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..a26b41c
Binary files /dev/null and b/chunks/locale/pl/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/pl/LC_MESSAGES/django.po b/chunks/locale/pl/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..c562232
--- /dev/null
@@ -0,0 +1,54 @@
+# 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"
diff --git a/chunks/locale/ru/LC_MESSAGES/django.mo b/chunks/locale/ru/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..e1d650c
Binary files /dev/null and b/chunks/locale/ru/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/ru/LC_MESSAGES/django.po b/chunks/locale/ru/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..593521f
--- /dev/null
@@ -0,0 +1,53 @@
+# 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 "приложения"
diff --git a/chunks/locale/uk/LC_MESSAGES/django.mo b/chunks/locale/uk/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..7c5388e
Binary files /dev/null and b/chunks/locale/uk/LC_MESSAGES/django.mo differ
diff --git a/chunks/locale/uk/LC_MESSAGES/django.po b/chunks/locale/uk/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..edb9b06
--- /dev/null
@@ -0,0 +1,53 @@
+# 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 "додатки"
diff --git a/chunks/migrations/0001_initial.py b/chunks/migrations/0001_initial.py
new file mode 100644 (file)
index 0000000..1fd5e1d
--- /dev/null
@@ -0,0 +1,59 @@
+# -*- 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 'Chunk'
+        db.create_table('chunks_chunk', (
+            ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)),
+            ('description', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
+            ('content_pl', self.gf('markupfield.fields.MarkupField')(rendered_field=True, blank=True)),
+            ('content_en', self.gf('markupfield.fields.MarkupField')(rendered_field=True, blank=True)),
+            ('content_pl_markup_type', self.gf('django.db.models.fields.CharField')(default=None, max_length=30, blank=True)),
+            ('content_en_markup_type', self.gf('django.db.models.fields.CharField')(default=None, max_length=30, blank=True)),
+            ('_content_pl_rendered', self.gf('django.db.models.fields.TextField')()),
+            ('_content_en_rendered', self.gf('django.db.models.fields.TextField')()),
+        ))
+        db.send_create_signal('chunks', ['Chunk'])
+
+        # Adding model 'Attachment'
+        db.create_table('chunks_attachment', (
+            ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)),
+            ('attachment', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
+        ))
+        db.send_create_signal('chunks', ['Attachment'])
+
+
+    def backwards(self, orm):
+        # Deleting model 'Chunk'
+        db.delete_table('chunks_chunk')
+
+        # Deleting model 'Attachment'
+        db.delete_table('chunks_attachment')
+
+
+    models = {
+        'chunks.attachment': {
+            'Meta': {'ordering': "('key',)", 'object_name': 'Attachment'},
+            'attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
+            'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'})
+        },
+        'chunks.chunk': {
+            'Meta': {'ordering': "('key',)", 'object_name': 'Chunk'},
+            '_content_en_rendered': ('django.db.models.fields.TextField', [], {}),
+            '_content_pl_rendered': ('django.db.models.fields.TextField', [], {}),
+            'content_en': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}),
+            'content_en_markup_type': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '30', 'blank': 'True'}),
+            'content_pl': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}),
+            'content_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '30', 'blank': 'True'}),
+            'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+            'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'})
+        }
+    }
+
+    complete_apps = ['chunks']
\ No newline at end of file
diff --git a/chunks/migrations/__init__.py b/chunks/migrations/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/chunks/models.py b/chunks/models.py
new file mode 100644 (file)
index 0000000..207fcd1
--- /dev/null
@@ -0,0 +1,47 @@
+from django.core.cache import cache
+from django.db import models
+from django.utils.translation import ugettext_lazy as _
+from markupfield.fields import MarkupField
+from fnpdjango.utils.models.translation import add_translatable
+
+
+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)
+
+    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
+
+add_translatable(Chunk, {
+    'content': MarkupField(_('content'), blank=True, markup_type='textile_pl',
+        help_text=_('Use <a href="http://textile.thresholdstate.com/">Textile</a> syntax.')),
+})
+
+
+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
diff --git a/chunks/templatetags/__init__.py b/chunks/templatetags/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/chunks/templatetags/chunks.py b/chunks/templatetags/chunks.py
new file mode 100644 (file)
index 0000000..ac762ad
--- /dev/null
@@ -0,0 +1,61 @@
+from django import template
+from django.db import models
+from django.core.cache import cache
+from ..models import Chunk, Attachment
+
+
+register = template.Library()
+
+
+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)
+
index 3374c58..8c1a256 100644 (file)
@@ -4,8 +4,10 @@
 
     <h1>{% block contact_form_title %}{% trans "Contact form" %}{% endblock %}</h1>
 
+    <div class="form-info">
     {% block contact_form_description %}
     {% endblock %}
+    </div>
 
     <form method="POST" action="." enctype="multipart/form-data" class="submit-form">
     {% csrf_token %}
index ec61087..374cd3c 100755 (executable)
@@ -6,6 +6,7 @@ INSTALLED_APPS = (
     'menu',
     'migdal',
     'contact',
+    'chunks',
 
     'sponsors',
     'gravatar',
index aa0c016..9f2f9c3 100644 (file)
@@ -31,3 +31,6 @@ h1 {
 
 .notice {
   font-size: 1.3em; }
+
+.normal {
+  font-size: 1.3em; }
index 67115d2..86f9a80 100644 (file)
@@ -40,3 +40,7 @@ h1 {
 .notice {
     font-size: 1.3em;
 }
+
+.normal {
+    font-size: 1.3em;
+}
index 4acb30f..6cd9a5c 100644 (file)
@@ -1,5 +1,5 @@
 .form-info {
-  font-size: 1.2em; }
+  font-size: 1.3em; }
 
 .submit-form {
   margin-top: 3em; }
index 7e8d90a..61b095f 100644 (file)
@@ -1,5 +1,5 @@
 .form-info {
-    font-size: 1.2em;
+    font-size: 1.3em;
 }
 
 .submit-form {
index 2f2ca24..51c964c 100644 (file)
@@ -1,5 +1,5 @@
 #header-bar {
-  height: 14em;
+  height: 13em;
   padding-top: 3em; }
   #header-bar .bar-left {
     margin-left: -1.1em; }
index 0278239..8e6a807 100755 (executable)
@@ -1,7 +1,9 @@
 {% extends "contact/form.html" %}
 {% load i18n %}
+{% load chunks %}
 
 {% block contact_form_title %}{% trans "Registration form" %}{% endblock %}
 
 {% block contact_form_description %}
+    {% chunk "formularz rejestracyjny" %}
 {% endblock %}