EntryType('news', _('news'), commentable=True, on_main=True, promotable=True),
EntryType('publications', _('publications')),
EntryType('info', _('info')),
+ EntryType('event', _('events')),
)
TYPE_SUBMIT = 'news'
TAXONOMIES = (
(None, {
'fields': _promo_if_necessary + (
'in_stream', 'author', 'author_email', 'canonical_url', 'image',
- 'date', 'first_published_at', 'changed_at')
+ 'date', 'first_published_at', 'changed_at', 'gallery')
}),
) + tuple(
(ln, {'fields': (
'slug_%s' % lc,
'lead_%s' % lc,
'body_%s' % lc,
+ 'place_%s' % lc,
+ 'time_%s' % lc,
)})
for lc, ln in app_settings.OBLIGATORY_LANGUAGES
) + tuple(
'slug_%s' % lc,
'lead_%s' % lc,
'body_%s' % lc,
+ 'place_%s' % lc,
+ 'time_%s' % lc,
)})
for lc, ln in app_settings.OPTIONAL_LANGUAGES
)
msgstr ""
"Project-Id-Version: django-migdal 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-04 12:58+0200\n"
+"POT-Creation-Date: 2018-07-09 14:54+0000\n"
"PO-Revision-Date: 2012-12-11 13:32+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: FNP <fundacja@nowoczesnapolska.org.pl>\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"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2)\n"
"X-Poedit-Language: Polish\n"
#: __init__.py:17
msgid "types"
msgstr "rodzaje"
-#: admin.py:44
+#: admin.py:75
msgid "Categories"
msgstr "Kategorie"
msgid "latest"
msgstr "ostatnie"
-#: feeds.py:32
-#: models.py:56
+#: feeds.py:32 models.py:85
msgid "entries"
msgstr "wpisy"
msgid "Content"
msgstr "Treść"
-#: models.py:20
+#: models.py:22
msgid "taxonomy"
msgstr "taksonomia"
-#: models.py:24
+#: models.py:25
msgid "category"
msgstr "kategoria"
-#: models.py:25
-#: models.py:52
-#: urls.py:41
-#: urls.py:43
+#: models.py:26 models.py:75 urls.py:39 urls.py:41
msgid "categories"
msgstr "kategorie"
-#: models.py:45
+#: models.py:58 models.py:72
+msgid "image"
+msgstr "obrazek"
+
+#: models.py:66
msgid "created at"
msgstr "data utworzenia"
-#: models.py:46
+#: models.py:67
msgid "changed at"
msgstr "data ostatniej zmiany"
-#: models.py:47
+#: models.py:68
msgid "author"
msgstr "autor"
-#: models.py:48
+#: models.py:70
msgid "author email"
msgstr "e-mail autora"
-#: models.py:49
+#: models.py:71
msgid "Used only to display gravatar and send notifications."
msgstr "Używany tylko do wyświetlenia gravatara i wysyłania powiadomień."
-#: models.py:50
-msgid "image"
-msgstr "obrazek"
-
-#: models.py:51
+#: models.py:73
msgid "promoted"
msgstr "promowane"
-#: models.py:55
-#: models.py:63
+#: models.py:74
+msgid "in stream"
+msgstr ""
+
+#: models.py:76 models.py:160
+msgid "published at"
+msgstr "data publikacji"
+
+#: models.py:77
msgid "canonical link"
msgstr "link kanoniczny"
+#: models.py:84
msgid "entry"
msgstr "wpis"
-#: models.py:80
+#: models.py:110
#, python-format
msgid "Published entry should have a slug in relevant language (%s)."
msgstr "Opublikowany wpis powinien mieć slug w odpowiednim języku (%s)."
-#: models.py:99
+#: models.py:129
#, python-format
msgid "Your story has been published at %s."
msgstr "Twój wpis został opublikowany na stronie %s."
-#: models.py:105
+#: models.py:141
msgid "needed"
msgstr "potrzebne"
-#: models.py:106
+#: models.py:142
msgid "Unneeded"
msgstr "Niepotrzebne"
-#: models.py:106
+#: models.py:142
msgid "Needed"
msgstr "Potrzebne"
-#: models.py:106
+#: models.py:142
msgid "Done"
msgstr "Ukończone"
-#: models.py:112
+#: models.py:146
+msgid ""
+"Use <a href=\"https://txstyle.org/article/44/an-overview-of-the-textile-"
+"syntax\">Textile</a> syntax."
+msgstr ""
+"Włączona składnia <a href=\"https://txstyle.org/article/44/an-overview-of-"
+"the-textile-syntax\">Textile</a>."
+
+#: models.py:150
msgid "title"
msgstr "tytuł"
-#: models.py:113
+#: models.py:152
msgid "lead"
msgstr "lead"
-#: models.py:114
-#: models.py:116
-msgid "Use <a href=\"http://textile.thresholdstate.com/\">Textile</a> syntax."
-msgstr "Włączona składnia <a href=\"http://textile.thresholdstate.com/\">Textile</a>."
-
-#: models.py:115
+#: models.py:154
msgid "body"
msgstr "treść"
-#: models.py:117
+#: models.py:156
+msgid "place"
+msgstr "miejsce"
+
+#: models.py:158
+msgid "time"
+msgstr "czas"
+
+#: models.py:159
msgid "published"
msgstr "opublikowane"
-#: models.py:118
-msgid "published at"
-msgstr "data publikacji"
-
-#: models.py:123
+#: models.py:165
msgid "file"
msgstr "plik"
-#: models.py:141
+#: models.py:181
#, python-format
msgid "New comment under your story at %s."
msgstr "Nowy komentarz pod Twoim wpisem na stronie %s."
-#: urls.py:38
-#: urls.py:39
-msgid "submit"
-msgstr "wyslij"
-
-#: urls.py:39
-msgid "thanks"
-msgstr "dzieki"
-
-#: urls.py:45
-msgid "search"
-msgstr "szukaj"
-
#: templates/comments/form.html:3
msgid "Add comment"
msgstr "Dodaj komentarz"
msgid "Comments"
msgstr "Komentarze"
-#: templates/comments/migdal/entry/preview.html:26
+#: templates/comments/migdal/entry/preview.html:21
msgid "Preview your comment"
msgstr "Podgląd komentarza"
-#: templates/migdal/entry/entry_detail.html:27
+#: templates/migdal/entry/entry_detail.html:26
msgid "This entry hasn't been published yet."
msgstr "Ten wpis nie został jeszcze opublikowany."
-#: templates/migdal/entry/entry_list.html:22
+#: templates/migdal/entry/entry_list.html:13
msgid "Category"
msgstr "Kategoria"
-#: templates/migdal/entry/entry_list.html:55
+#: templates/migdal/entry/entry_list.html:42
msgid "Submit a new story, create Right to Culture with us!"
msgstr "Dodaj nowy wpis, twórz Prawo Kultury razem z nami!"
+#: templates/migdal/entry/entry_list.html:47
+msgid "Work in progress."
+msgstr ""
+
#: templates/migdal/entry/entry_short.html:19
#, python-format
msgid "%(c)s comment"
msgid "read more"
msgstr "czytaj więcej"
-#: templates/migdal/entry/submit.html:7
+#: templates/migdal/entry/submit.html:6
msgid "Submit new story"
msgstr "Dodaj nowy wpis"
-#: templates/migdal/entry/submit.html:9
+#: templates/migdal/entry/submit.html:8
msgid ""
"\n"
"By submitting a story here, you agree to publish it under the terms of the\n"
-"<a href='http://creativecommons.org/licenses/by-sa/3.0/'>Creative Commons Attribution-Share Alike</a>\n"
+"<a href='http://creativecommons.org/licenses/by-sa/3.0/'>Creative Commons "
+"Attribution-Share Alike</a>\n"
"free license."
msgstr ""
"\n"
"Dodając wpis, zgadzasz się najego publikację na warunkach wolnej licencji\n"
-"<a href='http://creativecommons.org/licenses/by-sa/3.0/deed.pl'>Creative Commons Uznanie autorstwa – Na tych samych warunkach</a>."
+"<a href='http://creativecommons.org/licenses/by-sa/3.0/deed.pl'>Creative "
+"Commons Uznanie autorstwa – Na tych samych warunkach</a>."
-#: templates/migdal/entry/submit.html:14
+#: templates/migdal/entry/submit.html:13
msgid ""
"Stories are moderated, so please be\n"
"patient, you'll be notified when it's published."
-msgstr "Wpisy są moderowane. Bądź cierpliwy, otrzymasz powiadomienie o publikacji."
+msgstr ""
+"Wpisy są moderowane. Bądź cierpliwy, otrzymasz powiadomienie o publikacji."
-#: templates/migdal/entry/submit.html:21
+#: templates/migdal/entry/submit.html:20
msgid "Submit"
msgstr "Wyślij"
"and comments.\n"
msgstr ""
"\n"
-"Dziękujemy za dodanie nowego wpisu, teraz czeka on na moderację. Jeśli podano adres e-mail, będziemy Cię informowali o zmianach statusu i komentarzach\n"
+"Dziękujemy za dodanie nowego wpisu, teraz czeka on na moderację. Jeśli "
+"podano adres e-mail, będziemy Cię informowali o zmianach statusu i "
+"komentarzach\n"
-#: templates/search/search.html:9
+#: templates/search/search.html:8
msgid "Search results"
msgstr "Wyniki wyszukiwania"
-#: templates/search/search.html:18
+#: templates/search/search.html:17
msgid "No results found."
msgstr "Brak wyników."
-#: templates/search/search.html:25
+#: templates/search/search.html:24
msgid "previous"
msgstr "poprzednie"
-#: templates/search/search.html:28
+#: templates/search/search.html:27
msgid "next"
msgstr "następne"
-#: templatetags/migdal_tags.py:128
-msgid "Publications"
-msgstr "Publikacje"
+#: urls.py:35 urls.py:36
+msgid "submit"
+msgstr "wyslij"
+
+#: urls.py:36
+msgid "thanks"
+msgstr "dzieki"
+
+#: urls.py:43
+msgid "search"
+msgstr "szukaj"
+
+#~ msgid "Publications"
+#~ msgstr "Publikacje"
-#: templatetags/migdal_tags.py:129
-msgid "Events"
-msgstr "Wydarzenia"
+#~ msgid "Events"
+#~ msgstr "Wydarzenia"
-#: templatetags/migdal_tags.py:131
-msgid "Positions"
-msgstr "Stanowiska"
+#~ msgid "Positions"
+#~ msgstr "Stanowiska"
#~ msgid "Please correct the error below"
-
#~ msgid_plural "Please correct the errors below"
#~ msgstr[0] "Proszę poprawić poniższy błąd"
#~ msgstr[1] "Proszę poprawić poniższe błędy"
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.6 on 2018-07-10 08:49
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+import fnpdjango.utils.fields
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('migdal', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Photo',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('image', models.ImageField(blank=True, null=True, upload_to=b'entry/photo/', verbose_name='image')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='PhotoGallery',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('key', models.CharField(max_length=64)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Entry_event',
+ fields=[
+ ],
+ options={
+ 'verbose_name': 'entry: events',
+ 'proxy': True,
+ 'verbose_name_plural': 'entries: events',
+ },
+ bases=('migdal.entry',),
+ ),
+ migrations.AddField(
+ model_name='entry',
+ name='place_en',
+ field=models.CharField(blank=True, max_length=256, null=True, verbose_name='place'),
+ ),
+ migrations.AddField(
+ model_name='entry',
+ name='place_pl',
+ field=models.CharField(blank=True, max_length=256, null=True, verbose_name='place'),
+ ),
+ migrations.AddField(
+ model_name='entry',
+ name='time_en',
+ field=models.CharField(blank=True, max_length=256, null=True, verbose_name='time'),
+ ),
+ migrations.AddField(
+ model_name='entry',
+ name='time_pl',
+ field=models.CharField(blank=True, max_length=256, null=True, verbose_name='time'),
+ ),
+ migrations.AlterField(
+ model_name='entry',
+ name='body_en',
+ field=fnpdjango.utils.fields.TextileField(blank=True, help_text='Use <a href="https://txstyle.org/article/44/an-overview-of-the-textile-syntax">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='body'),
+ ),
+ migrations.AlterField(
+ model_name='entry',
+ name='body_pl',
+ field=fnpdjango.utils.fields.TextileField(blank=True, help_text='Use <a href="https://txstyle.org/article/44/an-overview-of-the-textile-syntax">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='body'),
+ ),
+ migrations.AlterField(
+ model_name='entry',
+ name='lead_en',
+ field=fnpdjango.utils.fields.TextileField(blank=True, help_text='Use <a href="https://txstyle.org/article/44/an-overview-of-the-textile-syntax">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='lead'),
+ ),
+ migrations.AlterField(
+ model_name='entry',
+ name='lead_pl',
+ field=fnpdjango.utils.fields.TextileField(blank=True, help_text='Use <a href="https://txstyle.org/article/44/an-overview-of-the-textile-syntax">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='lead'),
+ ),
+ migrations.AlterField(
+ model_name='entry',
+ name='type',
+ field=models.CharField(choices=[(b'news', 'news'), (b'publications', 'publications'), (b'info', 'info'), (b'event', 'events')], db_index=True, max_length=16),
+ ),
+ migrations.AddField(
+ model_name='photo',
+ name='gallery',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='migdal.PhotoGallery'),
+ ),
+ migrations.AddField(
+ model_name='entry',
+ name='gallery',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='migdal.PhotoGallery'),
+ ),
+ ]
from django.template import loader, Context
from django.utils.translation import ugettext_lazy as _, ugettext
from django_comments_xtd.models import XtdComment
-from markupfield.fields import MarkupField
+from fnpdjango.utils.fields import TextileField
from fnpdjango.utils.models.translation import add_translatable, tQ
from migdal import app_settings
from migdal.fields import SlugNullField
)
+class PhotoGallery(models.Model):
+ key = models.CharField(max_length=64)
+
+ def __unicode__(self):
+ return self.key
+
+
+class Photo(models.Model):
+ gallery = models.ForeignKey(PhotoGallery)
+ image = models.ImageField(_('image'), upload_to='entry/photo/', null=True, blank=True)
+
+
class Entry(models.Model):
type = models.CharField(
max_length=16,
categories = models.ManyToManyField(Category, blank=True, verbose_name=_('categories'))
first_published_at = models.DateTimeField(_('published at'), null=True, blank=True)
canonical_url = models.URLField(_('canonical link'), null=True, blank=True)
+ gallery = models.ForeignKey(PhotoGallery, null=True, blank=True)
objects = models.Manager()
published_objects = PublishedEntryManager()
default='n'),
})
+TEXTILE_HELP = _('Use <a href="https://txstyle.org/article/44/an-overview-of-the-textile-syntax">Textile</a> syntax.')
+
add_translatable(Entry, {
'slug': SlugNullField(unique=True, db_index=True, null=True, blank=True),
'title': models.CharField(_('title'), max_length=255, null=True, blank=True),
- 'lead': MarkupField(
- _('lead'), markup_type='textile_pl', null=True, blank=True,
- help_text=_('Use <a href="http://textile.thresholdstate.com/">Textile</a> syntax.')),
- 'body': MarkupField(
- _('body'), markup_type='textile_pl', null=True, blank=True,
- help_text=_('Use <a href="http://textile.thresholdstate.com/">Textile</a> syntax.')),
+ 'lead': TextileField(
+ _('lead'), markup_type='textile_pl', null=True, blank=True, help_text=TEXTILE_HELP),
+ 'body': TextileField(
+ _('body'), markup_type='textile_pl', null=True, blank=True, help_text=TEXTILE_HELP),
+ 'place': models.CharField(_('place'), null=True, blank=True, max_length=256),
+ 'time': models.CharField(_('time'), null=True, blank=True, max_length=256),
'published': models.BooleanField(_('published'), default=False),
'published_at': models.DateTimeField(_('published at'), null=True, blank=True),
})
--- /dev/null
+{% load i18n %}
+{% load thumbnail %}
+
+{% if detail %}
+ <h1>{{ object.title }}</h1>
+{% else %}
+ <h2><a href="{{ object.get_absolute_url }}">{{ object.title }}</a></h2>
+{% endif %}
+
+
+{% if object.image %}
+ <a href="{{ object.image.url }}">
+ <img class="entry-picture" src="{% thumbnail object.image "250x300" as thumb %}
+ {{ thumb.url }}
+ {% empty %}
+ {{ object.image.url }}
+ {% endthumbnail %}" />
+ </a>
+{% endif %}
+<div class="lead">
+{{ object.lead }}
+</div>
+{% if object.place %}
+ {{ object.place }}
+{% endif %}
+{% if object.time %}
+ {{ object.time }}
+{% endif %}
setup(
name='django-migdal',
- version='0.7.5',
+ version='0.7.6',
author='Radek Czajka',
author_email='radoslaw.czajka@nowoczesnapolska.org.pl',
maintainer='Jan Szejko',