From 3a2b863daf220221f8360db6e24072c6e102a50d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 22 Feb 2013 11:56:26 +0100 Subject: [PATCH] Enable tagging questions. --- prawokultury/locale-contrib/django.pot | 103 ++++++++++++++++++ .../locale-contrib/pl/LC_MESSAGES/django.mo | Bin 1793 -> 1971 bytes .../locale-contrib/pl/LC_MESSAGES/django.po | 69 +++++++----- prawokultury/settings.d/30-apps.py | 2 + prawokultury/settings.d/30-locale.py | 5 + prawokultury/urls.py | 1 + questions/admin.py | 1 + questions/models.py | 4 + requirements.txt | 3 + 9 files changed, 162 insertions(+), 26 deletions(-) create mode 100644 prawokultury/locale-contrib/django.pot diff --git a/prawokultury/locale-contrib/django.pot b/prawokultury/locale-contrib/django.pot new file mode 100644 index 0000000..b95d88a --- /dev/null +++ b/prawokultury/locale-contrib/django.pot @@ -0,0 +1,103 @@ +# Translations template for PROJECT. +# Copyright (C) 2013 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2013. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2013-02-22 11:35+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 0.9.6\n" + +#: django_comments_xtd/admin.py:11 +msgid "Content" +msgstr "" + +#: django_comments_xtd/admin.py:13 +msgid "Metadata" +msgstr "" + +#: django_comments_xtd/forms.py:13 +msgid "Notify me of follow up comments via email" +msgstr "" + +#: django_comments_xtd/forms.py:18 +msgid "Email address" +msgstr "" + +#: django_comments_xtd/forms.py:18 +msgid "Required for comment verification" +msgstr "" + +#: django_comments_xtd/forms.py:20 +msgid "your comment" +msgstr "" + +#: django_comments_xtd/models.py:24 +msgid "Receive by email further comments in this conversation" +msgstr "" + +#: django_comments_xtd/views.py:24 +msgid "comment confirmation request" +msgstr "" + +#: django_comments_xtd/views.py:152 +msgid "new comment posted" +msgstr "" + +#: django_comments_xtd/templates/django_comments_xtd/comment.html:15 +msgid "Comment for:" +msgstr "" + +#: django_comments_xtd/templates/django_comments_xtd/comment.html:19 +msgid "Inappropriate comments like this one are removed." +msgstr "" + +#: django_comments_xtd/templates/django_comments_xtd/discarded.html:4 +msgid "Comment discarded" +msgstr "" + +#: django_comments_xtd/templates/django_comments_xtd/discarded.html:7 +msgid "Comment automatically discarded" +msgstr "" + +#: django_comments_xtd/templates/django_comments_xtd/discarded.html:8 +msgid "Sorry, your comment has been automatically discarded" +msgstr "" + +#: django_comments_xtd/templates/django_comments_xtd/email_followup_comment.txt:4 +msgid "There is a new comment following up yours." +msgstr "" + +#: django_comments_xtd/templates/django_comments_xtd/email_followup_comment.txt:14 +msgid "Kind regards" +msgstr "" + +#: taggit_autosuggest/managers.py:11 +msgid "Tags" +msgstr "" + +#: taggit_autosuggest/managers.py:12 +msgid "A comma-separated list of tags." +msgstr "" + +#: taggit_autosuggest/widgets.py:67 +msgid "Enter Tag Here" +msgstr "" + +#: taggit_autosuggest/widgets.py:68 +msgid "No Results" +msgstr "" + +#: taggit_autosuggest/widgets.py:69 +msgid "No More Selections Are Allowed" +msgstr "" + diff --git a/prawokultury/locale-contrib/pl/LC_MESSAGES/django.mo b/prawokultury/locale-contrib/pl/LC_MESSAGES/django.mo index e1a238665fd431edfadbd9be3660912664896e0e..7304a2bfee9274dea8111d5bfd8e21518d77efb9 100644 GIT binary patch delta 744 zcmYk(&ui0Q7zgk-O)_h>ooy8r72hFymomhXc7G;AK9K%fzL}L4{hNekKQcLS$ z47_>L7ZE*)dhjBMyNrQ&a3?Q{cSXg2z^i!h`*a?B;pyj1c;6@A_w8zKZG7cxL3_wB z_Mi@;Hc^LAo`N5YZ}2eu{!b;vSRT(4a3?IoZEzZ9;VjI-C1^tdY2723hA&_SzJkXY zTVd;%OyR{3I05&oj7`F`P=g^n0eg@FK7|GN7E+ZpE_#7f9+l@lj(IJYok;zr1Xwaq7#qB_$GuwrtI5coIqs-KXMq1uiil???hMuFp zj@5WG=yn|=7NHY4iD+@pjT0U$^TcV#rd(H+a+mx>MEr`==CdLaGMk!9^92$2yd;*3 zsSOniWmes&lntw7luF#TtL4f`%eJh{{AFW7+;(F(@QsUTU*#ps{(s$R`A5B;3q5|W z(U|sJGl<$3Vqn;J2!>LE%S^ym0=B}btvomwLTA8 zt)VNtz#lYk@h}>Srt5c{u4~Ggel34BbmJlSone3TG41HdC;D8r9yuM}ANXzu9pq2_ MorZ(D^4Zvpzt+Zrg8%>k delta 551 zcmYk&KS+W>7{~Eb-`C2@EQ1^hjiw4iUo=citSG^>DIJ0WNf9Fzq$FC*rLn=Isj;=8 zXz0%n1g_x$d?>}%NTZv)z~U<^>h)EPBGMNB*x=h%T4 z=*AoD#}@YB$M60Z_A(b{A^c!RwI9PyOyM|Ya2gMAREWB`;w8XB3n$QS`3W+EDpUs5 zK}CF^Ne#Q0hxGOVVji8$bEpFBp$dG6>boNh;tAUD1y!I|bkkqF^Acx4w+b z7hm*5lF8V1ajH@+L~Y4zxv-lp, YEAR. +# FIRST AUTHOR , 2012. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-28 15:26+0200\n" -"PO-Revision-Date: 2012-08-28 15:42+0100\n" +"POT-Creation-Date: 2013-02-22 11:35+0100\n" +"PO-Revision-Date: 2013-02-22 11:37+0100\n" "Last-Translator: Radek Czajka \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"Language-Team: pl \n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\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" +"Generated-By: Babel 0.9.6\n" -#: admin.py:11 +#: django_comments_xtd/admin.py:11 msgid "Content" msgstr "Treść" -#: admin.py:13 +#: django_comments_xtd/admin.py:13 msgid "Metadata" msgstr "Metadane" -#: forms.py:13 +#: django_comments_xtd/forms.py:13 msgid "Notify me of follow up comments via email" msgstr "Powiadamiaj mnie o komentarzach" -#: forms.py:18 +#: django_comments_xtd/forms.py:18 msgid "Email address" msgstr "Adres e-mail" -#: forms.py:18 +#: django_comments_xtd/forms.py:18 msgid "Required for comment verification" msgstr "Wymagany do weryfikacji" -#: forms.py:20 +#: django_comments_xtd/forms.py:20 msgid "your comment" msgstr "Twój komentarz" -#: models.py:24 +#: django_comments_xtd/models.py:24 msgid "Receive by email further comments in this conversation" msgstr "Włącza powiadamianie e-mailem o kolejnych komentarzach w tym wątku." -#: views.py:24 +#: django_comments_xtd/views.py:24 msgid "comment confirmation request" msgstr "potwierdzenie komentarza" -#: views.py:152 +#: django_comments_xtd/views.py:152 msgid "new comment posted" msgstr "wysłano nowy komentarz" -#: templates/django_comments_xtd/comment.html:15 +#: django_comments_xtd/templates/django_comments_xtd/comment.html:15 msgid "Comment for:" msgstr "Komentarz do:" -#: templates/django_comments_xtd/comment.html:19 +#: django_comments_xtd/templates/django_comments_xtd/comment.html:19 msgid "Inappropriate comments like this one are removed." msgstr "Niewłaściwe komentarze, takie jak ten, są usuwane." -#: templates/django_comments_xtd/discarded.html:4 +#: django_comments_xtd/templates/django_comments_xtd/discarded.html:4 msgid "Comment discarded" msgstr "Komentarz odrzucony" -#: templates/django_comments_xtd/discarded.html:7 +#: django_comments_xtd/templates/django_comments_xtd/discarded.html:7 msgid "Comment automatically discarded" msgstr "Komentarz automatycznie odrzucony" -#: templates/django_comments_xtd/discarded.html:8 +#: django_comments_xtd/templates/django_comments_xtd/discarded.html:8 msgid "Sorry, your comment has been automatically discarded" msgstr "Przepraszamy, Twój komentarz został automatycznie odrzucony" -#: templates/django_comments_xtd/email_followup_comment.txt:4 +#: django_comments_xtd/templates/django_comments_xtd/email_followup_comment.txt:4 msgid "There is a new comment following up yours." msgstr "Pojawił się nowy komentarz" -#: templates/django_comments_xtd/email_followup_comment.txt:14 +#: django_comments_xtd/templates/django_comments_xtd/email_followup_comment.txt:14 msgid "Kind regards" msgstr "Pozdrawiam" -msgid "Comment" -msgstr "Komentarz" +#: taggit_autosuggest/managers.py:11 +msgid "Tags" +msgstr "Tagi" + +#: taggit_autosuggest/managers.py:12 +msgid "A comma-separated list of tags." +msgstr "Lista tagów oddzielonych przecinkami." + +#: taggit_autosuggest/widgets.py:67 +msgid "Enter Tag Here" +msgstr "Wpisz nazwę tagu" + +#: taggit_autosuggest/widgets.py:68 +msgid "No Results" +msgstr "Brak wyników" + +#: taggit_autosuggest/widgets.py:69 +msgid "No More Selections Are Allowed" +msgstr "" diff --git a/prawokultury/settings.d/30-apps.py b/prawokultury/settings.d/30-apps.py index 388c0be..1877989 100644 --- a/prawokultury/settings.d/30-apps.py +++ b/prawokultury/settings.d/30-apps.py @@ -17,6 +17,8 @@ INSTALLED_APPS = ( 'piwik.django', 'django_cas', 'honeypot', + 'taggit', + 'taggit_autosuggest', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/prawokultury/settings.d/30-locale.py b/prawokultury/settings.d/30-locale.py index cafb273..d239653 100644 --- a/prawokultury/settings.d/30-locale.py +++ b/prawokultury/settings.d/30-locale.py @@ -34,3 +34,8 @@ USE_L10N = True USE_TZ = True FORMAT_MODULE_PATH = "prawokultury.formats" + +CONTRIB_LOCALE_APPS = [ + 'django_comments_xtd', + 'taggit_autosuggest' +] diff --git a/prawokultury/urls.py b/prawokultury/urls.py index 4c957e5..9525284 100644 --- a/prawokultury/urls.py +++ b/prawokultury/urls.py @@ -19,6 +19,7 @@ urlpatterns = patterns('', url(r'^media/(?P.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, }), + url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), ) if 'django.contrib.sitemaps' in settings.INSTALLED_APPS: diff --git a/questions/admin.py b/questions/admin.py index 7d81a20..9db5ff7 100755 --- a/questions/admin.py +++ b/questions/admin.py @@ -13,6 +13,7 @@ class QuestionAdmin(admin.ModelAdmin): 'approved', 'edited_question', 'answer', + 'tags', ('answered', 'answered_at'), ('published', 'published_at'), diff --git a/questions/models.py b/questions/models.py index b441a00..2955ddb 100644 --- a/questions/models.py +++ b/questions/models.py @@ -7,6 +7,8 @@ from django.db import models from django.template import loader, Context from django.utils.translation import ugettext_lazy as _ from markupfield.fields import MarkupField +from taggit_autosuggest.managers import TaggableManager + class Question(models.Model): email = models.EmailField(_('contact e-mail'), null=True, blank=True) @@ -25,6 +27,8 @@ class Question(models.Model): help_text=_('Check to display answered question on site.')) published_at = models.DateTimeField(_('published at'), null=True, blank=True, db_index=True) + tags = TaggableManager() + class Meta: ordering = ['-created_at'] verbose_name = _('question') diff --git a/requirements.txt b/requirements.txt index 1da2653..ef0a9ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,3 +24,6 @@ django-pipeline>=1.2,<1.3 -e git+https://github.com/toastdriven/django-haystack.git@61b377d97efd5390c60c5a37acd009b8e69eb2f3#egg=django-haystack pysolr piwik + +django-taggit +django-taggit-autosuggest -- 2.20.1