Commits

Guilherme Gondim committed d9d9051

Fixed #27 --- Add field for enable/disable comments

  • Participants
  • Parent commits 441e0bf
  • Tags 0.1-joaquim

Comments (0)

Files changed (9)

File diario/__init__.py

 from diario.utils import get_svn_revision
 
 
-VERSION = (0, 1, 'pre')
+VERSION = (0, 2, 'pre')
 
 def get_version():
     """

File diario/locale/es/LC_MESSAGES/django.mo

Binary file modified.

File diario/locale/es/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: django-diario 0.1-pre\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-02-25 21:38-0300\n"
+"POT-Creation-Date: 2008-02-26 13:58-0300\n"
 "PO-Revision-Date: 2007-10-24 01:12-0200\n"
 "Last-Translator: Ricardo Fuentes <jirah@jirah.org>\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 msgid "Raw text"
 msgstr ""
 
-#: models.py:51
+#: models.py:50
 msgid "title"
 msgstr "título"
 
-#: models.py:53
+#: models.py:52
 msgid "slug"
 msgstr ""
 
-#: models.py:56
+#: models.py:55
 #, fuzzy
 msgid ""
 "Automatically built from the title. A slug is a short label generally used "
 "Construido automaticamente a partir del título. Un slug es una etiqueta "
 "usada en URLs."
 
-#: models.py:59
+#: models.py:58
 msgid "body"
 msgstr "cuerpo"
 
-#: models.py:61
-msgid "body in raw HTML"
+#: models.py:60
+#, fuzzy
+msgid "body in HTML"
 msgstr "cuerpo en HTML puro"
 
-#: models.py:66
+#: models.py:65
 msgid "markup language"
 msgstr "lenguaje de marcación"
 
-#: models.py:71
+#: models.py:70
 msgid ""
 "Uses \"Raw text\" if you want enter directly in HTML (or apply markup in "
 "other place)."
 msgstr ""
 
-#: models.py:75
+#: models.py:74
 msgid "draft"
 msgstr "borrador"
 
-#: models.py:77
+#: models.py:76
 msgid "Drafts are not published."
 msgstr "Borradores no son publicados."
 
-#: models.py:80
+#: models.py:79
 msgid "date published"
 msgstr "fecha de publicación"
 
-#: models.py:82
+#: models.py:81
 msgid "Entries in future dates are only published on correct date."
 msgstr ""
 "Entradas en fechas futuras serán publicadas solo en las fechas correctas."
 
-#: models.py:85
+#: models.py:84
 msgid "publish on"
 msgstr "publicar en"
 
+#: models.py:85
+msgid "enable comments"
+msgstr ""
+
 #: models.py:99
 msgid "entry"
 msgstr "entrada"
 msgid "entries"
 msgstr "entradas"
 
-#: models.py:109
-msgid "Other options"
+#: models.py:110
+msgid "Status"
+msgstr ""
+
+#: models.py:111
+msgid "Discussion"
+msgstr ""
+
+#: models.py:112
+#, fuzzy
+msgid "Advanced options"
 msgstr "Otras opciones"

File diario/locale/fr/LC_MESSAGES/django.mo

Binary file modified.

File diario/locale/fr/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: django-diario 0.1-pre\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-02-25 21:38-0300\n"
+"POT-Creation-Date: 2008-02-26 13:58-0300\n"
 "PO-Revision-Date: 2008-02-07 18:49-0200\n"
 "Last-Translator: Bruno Bord <bbord@interfaceip.fr>\n"
 "Language-Team: Bruno Bord <bruno@jehaisleprintemps.net>\n"
 msgid "Raw text"
 msgstr ""
 
-#: models.py:51
+#: models.py:50
 msgid "title"
 msgstr "titre"
 
-#: models.py:53
+#: models.py:52
 msgid "slug"
 msgstr ""
 
-#: models.py:56
+#: models.py:55
 #, fuzzy
 msgid ""
 "Automatically built from the title. A slug is a short label generally used "
 "Construit automatiquement à partir du titre. Un \"slug\" est une chaîne "
 "utilisée dans les URLs."
 
-#: models.py:59
+#: models.py:58
 msgid "body"
 msgstr "corps"
 
-#: models.py:61
-msgid "body in raw HTML"
+#: models.py:60
+#, fuzzy
+msgid "body in HTML"
 msgstr "corps en HTML pur"
 
-#: models.py:66
+#: models.py:65
 msgid "markup language"
 msgstr "format de balisage"
 
-#: models.py:71
+#: models.py:70
 msgid ""
 "Uses \"Raw text\" if you want enter directly in HTML (or apply markup in "
 "other place)."
 msgstr ""
 
-#: models.py:75
+#: models.py:74
 msgid "draft"
 msgstr "brouillon"
 
-#: models.py:77
+#: models.py:76
 msgid "Drafts are not published."
 msgstr "Les brouillons ne sont pas publiés."
 
-#: models.py:80
+#: models.py:79
 msgid "date published"
 msgstr "date de publication"
 
-#: models.py:82
+#: models.py:81
 msgid "Entries in future dates are only published on correct date."
 msgstr ""
 "Les articles avec des dates dans le futur seront publiés à la bonne date."
 
-#: models.py:85
+#: models.py:84
 msgid "publish on"
 msgstr "publié sur"
 
+#: models.py:85
+msgid "enable comments"
+msgstr ""
+
 #: models.py:99
 msgid "entry"
 msgstr "article"
 msgid "entries"
 msgstr "articles"
 
-#: models.py:109
-msgid "Other options"
+#: models.py:110
+msgid "Status"
+msgstr ""
+
+#: models.py:111
+msgid "Discussion"
+msgstr ""
+
+#: models.py:112
+#, fuzzy
+msgid "Advanced options"
 msgstr "Autres options"

File diario/locale/pt_BR/LC_MESSAGES/django.mo

Binary file modified.

File diario/locale/pt_BR/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: django-diario 0.1-pre\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-02-25 21:38-0300\n"
-"PO-Revision-Date: 2008-02-25 21:45-0300\n"
+"POT-Creation-Date: 2008-02-26 13:58-0300\n"
+"PO-Revision-Date: 2008-02-26 13:59-0300\n"
 "Last-Translator: Guilherme Mesquita Gondim <semente@taurinus.org>\n"
 "Language-Team: Português Brasil <django-l10n-portuguese@googlegroups.com>\n"
 "MIME-Version: 1.0\n"
 msgid "Raw text"
 msgstr "Texto puro"
 
-#: models.py:51
+#: models.py:50
 msgid "title"
 msgstr "título"
 
-#: models.py:53
+#: models.py:52
 msgid "slug"
 msgstr ""
 
-#: models.py:56
+#: models.py:55
 msgid ""
 "Automatically built from the title. A slug is a short label generally used "
 "in URLs."
-msgstr "Construído automaticamente a partir do título. Um slug é uma pequena etiqueta geralmente utilizada em URLs."
+msgstr ""
+"Construído automaticamente a partir do título. Um slug é uma pequena "
+"etiqueta geralmente utilizada em URLs."
 
-#: models.py:59
+#: models.py:58
 msgid "body"
 msgstr "corpo"
 
-#: models.py:61
-msgid "body in raw HTML"
-msgstr "corpo em HTML puro"
+#: models.py:60
+msgid "body in HTML"
+msgstr "corpo em HTML"
 
-#: models.py:66
+#: models.py:65
 msgid "markup language"
 msgstr "linguagem de marcação"
 
-#: models.py:71
+#: models.py:70
 msgid ""
 "Uses \"Raw text\" if you want enter directly in HTML (or apply markup in "
 "other place)."
-msgstr "Use \"Texto puro\" se você precisa escrever diretamente em HTML (ou aplicar a marcação em outro lugar)."
+msgstr "Use \"Texto puro\" se você desejar escrever diretamente em HTML (ou aplicar a marcação em outro lugar)."
 
-#: models.py:75
+#: models.py:74
 msgid "draft"
 msgstr "rascunho"
 
-#: models.py:77
+#: models.py:76
 msgid "Drafts are not published."
 msgstr "Rascunhos não são publicados."
 
-#: models.py:80
+#: models.py:79
 msgid "date published"
 msgstr "data de publicação"
 
-#: models.py:82
+#: models.py:81
 msgid "Entries in future dates are only published on correct date."
 msgstr "Entradas com datas no futuro são publicadas somente na data certa."
 
-#: models.py:85
+#: models.py:84
 msgid "publish on"
 msgstr "publicar em"
 
+#: models.py:85
+msgid "enable comments"
+msgstr "habilitar comentários"
+
 #: models.py:99
 msgid "entry"
 msgstr "entrada"
 msgid "entries"
 msgstr "entradas"
 
-#: models.py:109
-msgid "Other options"
-msgstr "Outras opções"
+#: models.py:110
+msgid "Status"
+msgstr ""
+
+#: models.py:111
+msgid "Discussion"
+msgstr "Discussão"
+
+#: models.py:112
+msgid "Advanced options"
+msgstr "Opções avançadas"

File diario/models.py

     ('raw',      _('Raw text')),
 )
 
-ADMIN_FIELDS = ['title', 'slug', 'pub_date', 'body_source', 'tags', 'is_draft']
-
 if HAS_TAG_SUPPORT:
     from tagging.fields import TagField
+    ADMIN_TAG_FIELD = ['tags']
 else:
-    ADMIN_FIELDS.remove('tags')
+    ADMIN_TAG_FIELD = []
 
 
 class Entry(models.Model):
     )
     body_source = models.TextField(_('body'))
     body = models.TextField(
-        _('body in raw HTML'),
+        _('body in HTML'),
         blank=True,
         editable=False,
     )
                     'correct date.'),
     )
     publish_on = models.ManyToManyField(Site, verbose_name=_('publish on'))
+    enable_comments = models.BooleanField(_('enable comments'), default=True)
 
     if HAS_TAG_SUPPORT:
         tags = TagField(blank=True)
         verbose_name_plural = _('entries')
 
     class Admin:
-        list_display  = ('title', 'pub_date', 'is_draft')
-        list_filter   = ('is_draft', 'publish_on', 'markup')
-        search_fields = ['title', 'slug', 'body']
+        list_display  = ('title', 'pub_date', 'is_draft', 'enable_comments')
+        list_filter   = ('is_draft', 'publish_on', 'enable_comments', 'markup')
+        search_fields = ('title', 'slug', 'body')
         date_hierarchy = 'pub_date'
         fields = (
-            (None, {'fields': ADMIN_FIELDS}),
-            (_('Other options'), {
+            (None, {'fields': ['title', 'slug', 'pub_date', 'body_source'] + \
+                        ADMIN_TAG_FIELD}),
+            (_('Status'), {'fields': ('is_draft', 'publish_on')}),
+            (_('Discussion'), {'fields': ('enable_comments',)}),
+            (_('Advanced options'), {
                 'classes': 'collapse',
-                'fields': ('markup', 'publish_on'),
+                'fields': ('markup',),
             })
         )
 

File docs/install.txt

 
     python -c "import diario; print diario.get_version()"
 
-You get a output like ``0.1-pre-SVN-XXX``.
+You get a output like ``0.2-pre-SVN-XXX``.
 
 For more information, see the Python documentation page 
 `Installing Python Modules`_.