From: Radek Czajka Date: Fri, 22 Feb 2013 10:56:26 +0000 (+0100) Subject: Enable tagging questions. X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/3a2b863daf220221f8360db6e24072c6e102a50d?ds=sidebyside Enable tagging questions. --- 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 e1a2386..7304a2b 100644 Binary files a/prawokultury/locale-contrib/pl/LC_MESSAGES/django.mo and b/prawokultury/locale-contrib/pl/LC_MESSAGES/django.mo differ diff --git a/prawokultury/locale-contrib/pl/LC_MESSAGES/django.po b/prawokultury/locale-contrib/pl/LC_MESSAGES/django.po index f426b65..f0a2df7 100644 --- a/prawokultury/locale-contrib/pl/LC_MESSAGES/django.po +++ b/prawokultury/locale-contrib/pl/LC_MESSAGES/django.po @@ -1,86 +1,103 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , 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