H3n0xek avatar H3n0xek committed 7d2c6c8 Merge

Merged up

Comments (0)

Files changed (67)

 
 Project page
     https://bitbucket.org/semente/django-diario
+Documentation
+    TODO
 Translations
     https://www.transifex.net/projects/p/django-diario/
 
 .. _`Django`: http://www.djangoproject.com
 
 
-Installing & Setup
-==================
-
-TODO
-
-Extending Entry model
----------------------
-
-You might want add a field (or remove, override and so on) to Diário's Entry
-model. Follows a step-by-step how you can add a category support to your
-entries to you figure out how do similar things:
-
-1. Create a app named ``mydiary`` (or whatever you want);
-
-2. In its ``models.py``, write::
-
-  from django.db import models
-  from django.utils.translation import ugettext_lazy as _
-
-  from diario.models import BaseEntry
-
-
-  class Category(models.Model):
-      name = models.CharField(_('name'), max_length=64)
-
-      class Meta:
-          app_label = 'diario'
-          verbose_name = _('category')
-          verbose_name_plural = _('categories')
-
-
-      def __unicode__(self):
-          return unicode(self.name)
-
-
-  class Entry(BaseEntry):
-      category = models.ManyToManyField(
-          'diario.Category',
-          verbose_name=_('category'),
-          related_name='entries'
-      )
-
-(If you don't want inherit from BaseEntry, be sure you model is abstract.)
-
-3. You might use ``django.contrib.admin``, so the app's ``admin.py`` must
-   be customized to show the category field::
-
-  from django.contrib import admin
-  from django.utils.translation import ugettext_lazy as _
-
-  from diario.admin import EntryAdmin
-  from diario.models import Entry
-  from mydiary.models import Category
-
-
-  class CategoryAdmin(admin.ModelAdmin):
-      list_display  = ('id', 'name')
-
-
-  class CustomEntryAdmin(EntryAdmin):
-      fieldsets = (
-          (None, {
-              'fields': ('title', 'slug', 'body', 'category')
-          }),
-          (_('Status'), {
-              'fields': ('visible', 'publish_on', 'pub_date')
-          }),
-          (_('Discussion'), {
-              'fields': ('enable_comments',)
-          }),
-      )
-    list_display  = ('title', 'pub_date', 'author', 'visible',
-                     'enable_comments', 'category')
-    list_filter   = ('visible', 'publish_on', 'enable_comments', 'pub_date',
-                     'category')
-
-
-  admin.site.register(Category, CategoryAdmin)
-  admin.site.unregister(Entry)
-  admin.site.register(Entry, CustomEntryAdmin)
-
-4. Now just add ``mydiary`` to your ``INSTALLED_APPS`` setting and set up
-   ``DIARIO_ENTRY_CLASS`` also in ``settings.py`` as follows::
-
-  DIARIO_ENTRY_CLASS = 'mydiary.models.Entry'
-
-5. Then just run ``syncdb`` and your are done... unless you are using `South`.
-   For `South` users, this setting will be useful::
-
-  SOUTH_MIGRATION_MODULES = {
-      'diario': 'mydiary.migrations',
-  }
-
-
-
-
-
 License
 =======
 
 
 from django.contrib import admin
 from django.utils.translation import ugettext_lazy as _
-from diario.models import Entry
 
 
-class EntryAdmin(admin.ModelAdmin):
+class BaseEntryAdmin(admin.ModelAdmin):
     date_hierarchy = 'pub_date'
-    fieldsets = (
-        (None, {
-            'fields': ('title', 'slug', 'body')
-        }),
-        (_('Status'), {
-            'fields': ('visible', 'publish_on', 'pub_date')
-        }),
-        (_('Discussion'), {
-            'fields': ('enable_comments',)
-        }),        
-    )
-    list_display  = ('title', 'pub_date', 'author', 'visible',
-                     'enable_comments')
-    list_filter   = ('visible', 'publish_on', 'enable_comments', 'pub_date')
-    prepopulated_fields = {'slug': ('title',)}    
-    search_fields = ['title', 'slug', 'body', 'author__username',
-                     'author__first_name', 'author__last_name']
+    list_display = ('title', 'pub_date', 'author', 'visible')
+    list_filter  = ('visible', 'pub_date', 'pub_date', 'author')
+    prepopulated_fields = {'slug': ('title',)}
+    search_fields = ('title', 'slug', 'body', 'author__username',
+                     'author__first_name', 'author__last_name', 'author__email')
+
+    def get_basic_fieldset(self, request, obj=None):
+        return ['title', 'slug', 'body']
+
+    def get_status_fieldset(self, request, obj=None):
+        return ['visible', 'pub_date']
+
+    def get_fieldsets(self, request, obj=None):
+        return (
+            (None, {'fields': self.get_basic_fieldset(request, obj)}),
+            (_('Status'), {'fields': self.get_status_fieldset(request, obj)}),
+        )
 
     def has_change_permission(self, request, obj=None):
         """Called from the individual object editing page, to ensure the user
         otherwise returns ``False``.
 
         """
-        has_class_permission = super(EntryAdmin, self).has_change_permission(request, obj)
-        if not has_class_permission:
+        has_change_permission = super(BaseEntryAdmin, self).has_change_permission(request, obj)
+        if not has_change_permission:
             return False
         if obj is not None and not request.user.is_superuser:
             if request.user.id != obj.author.id:
 
         """
         if request.user.is_superuser:
-            return Entry.objects.all()
-        return Entry.objects.filter(author=request.user)
+            return self.model.objects.all()
+        return self.model.objects.filter(author=request.user)
 
     def save_model(self, request, obj, form, change):
         """Automatically fill in the author field on creation."""
         if not change:
             obj.author = request.user
-        super(EntryAdmin, self).save_model(request, obj, form, change)
+        super(BaseEntryAdmin, self).save_model(request, obj, form, change)
 
-admin.site.register(Entry, EntryAdmin)
+
+class EntryAdmin(BaseEntryAdmin):
+    pass
Add a comment to this file

diario/contrib/__init__.py

Empty file added.

diario/contrib/weblog/README

+A working weblog application based on Django Diário.
Add a comment to this file

diario/contrib/weblog/__init__.py

Empty file added.

diario/contrib/weblog/admin.py

+from django.contrib import admin
+from diario.admin import BaseEntryAdmin
+
+from .models import Entry
+
+
+class EntryAdmin(BaseEntryAdmin):
+    pass
+
+admin.site.register(Entry, EntryAdmin)

diario/contrib/weblog/migrations/0001_initial.py

+# -*- 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 'Entry'
+        db.create_table('weblog_entry', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('title', self.gf('django.db.models.fields.CharField')(max_length=100)),
+            ('body', self.gf('django.db.models.fields.TextField')()),
+            ('visible', self.gf('django.db.models.fields.BooleanField')(default=True)),
+            ('date_added', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+            ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+            ('pub_date', self.gf('django.db.models.fields.DateTimeField')(blank=True)),
+            ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
+            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
+        ))
+        db.send_create_signal('weblog', ['Entry'])
+
+
+    def backwards(self, orm):
+        # Deleting model 'Entry'
+        db.delete_table('weblog_entry')
+
+
+    models = {
+        'auth.group': {
+            'Meta': {'object_name': 'Group'},
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+        },
+        'auth.permission': {
+            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+        },
+        'auth.user': {
+            'Meta': {'object_name': 'User'},
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+        },
+        'contenttypes.contenttype': {
+            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+        },
+        'weblog.entry': {
+            'Meta': {'ordering': "('-pub_date',)", 'object_name': 'Entry'},
+            'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
+            'body': ('django.db.models.fields.TextField', [], {}),
+            'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'pub_date': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
+        }
+    }
+
+    complete_apps = ['weblog']
Add a comment to this file

diario/contrib/weblog/migrations/__init__.py

Empty file added.

diario/contrib/weblog/models.py

+from django.db import models
+from diario.models import BaseEntryModel
+
+
+class Entry(BaseEntryModel):
+    pass

diario/contrib/weblog/urls.py

+from django.conf.urls.defaults import *
+
+from . import views
+
+
+urlpatterns = patterns('',
+    url(r'^atom/$', views.AtomEntriesFeed(), name='diario-entry-atom'),
+    url(r'^$', views.EntryListView.as_view(), name='diario-entry-list'),
+    url(
+        r'^(?P<year>\d{4})/(?P<month>[0-9]{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
+        views.EntryDetailView.as_view(),
+        name='diario-entry-detail'
+    ),
+)

diario/contrib/weblog/views.py

+from diario.feeds import BaseAtomEntriesFeed
+from diario.views import BaseEntryDetailView, BaseEntryListView
+
+from .models import Entry
+
+
+class AtomEntriesFeed(BaseAtomEntriesFeed):
+
+    def get_query_set(self):
+        return Entry.objects.visible().order_by('-pub_date')
+
+
+class EntryDetailView(BaseEntryDetailView):
+    model = Entry
+
+
+class EntryListView(BaseEntryListView):
+    model = Entry

diario/feeds/__init__.py

+from diario.feeds.entries import BaseRssEntriesFeed, BaseAtomEntriesFeed
+from diario.feeds.entries_by_author import BaseRssEntriesByAuthorFeed, BaseAtomEntriesByAuthorFeed
+
+__all__ = [
+    'BaseRssEntriesFeed', 'BaseAtomEntriesFeed',
+    'BaseRssEntriesByAuthorFeed', 'BaseAtomEntriesByAuthorFeed'
+]

diario/feeds/comments.py

-# -*- coding: utf-8 -*-
-#
-#  Copyright (c) 2007-2012 Guilherme Gondim and contributors
-#
-#  This file is part of Django Diário.
-#
-#  Django Diário is free software under terms of the GNU Lesser
-#  General Public License version 3 (LGPLv3) as published by the Free
-#  Software Foundation. See the file README for copying conditions.
-#
-
-from django.conf import settings
-from django.contrib.comments.models import Comment
-from django.contrib.syndication.views import Feed
-from django.contrib.syndication.views import FeedDoesNotExist
-from django.utils.feedgenerator import Atom1Feed
-from django.contrib.sites.models import Site
-from django.core.urlresolvers import reverse
-from django.shortcuts import get_object_or_404
-from django.utils.translation import ugettext as _
-
-from diario.models import Entry
-
-
-class RssCommentsFeed(Feed):
-    """All weblog comments RSS feeds.
-    """
-    description = _('Latest comments on Weblog')
-    title_template = 'feeds/comments_title.html'
-    description_template = 'feeds/comments_description.html'
-
-    def title(self):
-        if not hasattr(self, '_site'):
-            self._site = Site.objects.get_current()
-        return _("%(title)s's Weblog comments") % {'title': self._site.name}
-
-    def link(self):
-        return reverse('diario-entry-list')
-
-    def item_pubdate(self, comment):
-        return comment.submit_date
-
-    def get_query_set(self):
-        get_list_function = Comment.objects.filter
-        kwargs = {
-            'is_public': True,
-            'site__pk': settings.SITE_ID,
-            'content_type__app_label__exact': 'diario',
-            'content_type__model__exact': 'entry',
-        }
-        return get_list_function(**kwargs).order_by('-submit_date')
-
-    def items(self):
-        return self.get_query_set()[:30]
-
-
-class AtomCommentsFeed(RssCommentsFeed):
-    """All weblog comments Atom feeds.
-    """
-    feed_type = Atom1Feed
-    subtitle = RssCommentsFeed.description
-
-
-
-class RssCommentsByEntryFeed(RssCommentsFeed):
-    """Comments RSS feeds for a specific entry.
-    """
-
-    def get_object(self, request, year, month, day, slug):
-        kwargs = {
-            'pub_date__year': year,
-            'pub_date__month': month,
-            'pub_date__day': day,
-            'slug': slug
-        }
-        return get_object_or_404(Entry, **kwargs)
-
-    def title(self, entry):
-        if not hasattr(self, '_site'):
-            self._site = Site.objects.get_current()
-        return _("Comments on: %(entry title)s @ %(weblog title)s's Weblog") %\
-            {'entry title':  entry.title, 'weblog title': self._site.name}
-
-    def description(self, entry):
-        return _('Latest comments for "%(title)s"') % {'title': entry.title}
-
-    def link(self, entry):
-        if not entry:
-            raise FeedDoesNotExist
-        return reverse('diario-entry', kwargs={
-            'year' : str(entry.pub_date.year),
-            'month': str(entry.pub_date.month).zfill(2),
-            'day'  : str(entry.pub_date.day).zfill(2),
-            'slug' : str(entry.slug)
-        })
-
-    def item_author_name(self, comment):
-        return comment.user_name
-
-    def item_author_link(self, comment):
-        return comment.user_url
-
-    def get_query_set(self, entry):
-        get_list_function = Comment.objects.filter
-        kwargs = {
-            'is_public': True,
-            'site__pk': settings.SITE_ID,
-            'content_type__app_label__exact': 'diario',
-            'content_type__model__exact': 'entry',
-            'object_pk': entry.id
-        }
-        return get_list_function(**kwargs).order_by('-submit_date')
-
-    def items(self, entry):
-        return self.get_query_set(entry)[:30]
-
-
-class AtomCommentsByEntryFeed(RssCommentsByEntryFeed):
-    """Comments Atom feeds for a specific entry.
-    """
-    feed_type = Atom1Feed
-    subtitle = RssCommentsByEntryFeed.description

diario/feeds/entries.py

 from django.core.urlresolvers import reverse, NoReverseMatch
 from django.utils.translation import ugettext as _
 
-from diario.models import Entry
 
-
-class RssEntriesFeed(Feed):
-    description = _('Latest entries on Weblog')
-    title_template = 'feeds/diario_title.html'
-    description_template = 'feeds/diario_description.html'
+class BaseRssEntriesFeed(Feed):
+    description = _('Latest entries on weblog')
+    title_template = 'diario/entry_feed_title.html'
+    description_template = 'diario/entry_feed_description.html'
 
     def title(self):
         if not hasattr(self, '_site'):
         return reverse('diario-entry-list')
 
     def get_query_set(self):
-        return Entry.on_site.visible().order_by('-pub_date')
+        raise NotImplementedError
 
     def items(self):
         return self.get_query_set()[:15]
             return entry.author.get_full_name()
         return entry.author.username
 
-    def item_author_email(self, entry):
-        if entry.author.email:
-            return entry.author.email
-
     def item_author_link(self, entry):
         try:
             return reverse('diario-author-entry-list',
                            args=[entry.author.username])
         except NoReverseMatch:
-            pass
+            try:
+                return reverse('diario-entry-list')
+            except NoReverseMatch:
+                pass
 
     def item_pubdate(self, entry):
         return entry.pub_date
 
-    def item_categories(self, entry):
-        try:
-            return entry.tags.split()
-        except AttributeError:
-            pass      # ignore if not have django-tagging support
 
+class BaseAtomEntriesFeed(BaseRssEntriesFeed):
+    feed_type = Atom1Feed
+    subtitle = BaseRssEntriesFeed.description
 
-class AtomEntriesFeed(RssEntriesFeed):
-    feed_type = Atom1Feed
-    subtitle = RssEntriesFeed.description
+    def get_query_set(self):
+        raise NotImplementedError

diario/feeds/entries_by_author.py

 from django.shortcuts import get_object_or_404
 from django.utils.translation import ugettext as _
 
-from diario.feeds.entries import RssEntriesFeed
-from diario.models import Entry
+from diario.feeds.entries import BaseRssEntriesFeed
 
 
-class RssEntriesByAuthorFeed(RssEntriesFeed):
+class BaseRssEntriesByAuthorFeed(BaseRssEntriesFeed):
 
     def get_object(self, request, username):
         return get_object_or_404(User, username__exact=username)
         return reverse('diario-author-entry-list', args=[user.username])
 
     def get_query_set(self, user):
-        queryset = Entry.on_site.visible().filter(author=user)
-        return queryset.order_by('-pub_date')
+        raise NotImplementedError
 
     def items(self, user):
         return self.get_query_set(user)[:15]
 
 
-class AtomEntriesByAuthorFeed(RssEntriesByAuthorFeed):
+class BaseAtomEntriesByAuthorFeed(BaseRssEntriesByAuthorFeed):
     feed_type = Atom1Feed
-    subtitle = RssEntriesByAuthorFeed.description
+    subtitle = BaseRssEntriesByAuthorFeed.description

diario/feeds/tagged.py

-# -*- coding: utf-8 -*-
-#
-#  Copyright (c) 2007-2012 Guilherme Gondim and contributors
-#
-#  This file is part of Django Diário.
-#
-#  Django Diário is free software under terms of the GNU Lesser
-#  General Public License version 3 (LGPLv3) as published by the Free
-#  Software Foundation. See the file README for copying conditions.
-#
-
-from django.contrib.syndication.views import Feed
-from django.contrib.syndication.views import FeedDoesNotExist
-from django.utils.feedgenerator import Atom1Feed
-from django.contrib.sites.models import Site
-from django.core.exceptions import ObjectDoesNotExist
-from django.core.urlresolvers import reverse
-from django.shortcuts import get_object_or_404
-from django.utils.translation import ugettext as _
-
-from diario.feeds.entries import RssEntriesFeed
-from diario.models import Entry
-from tagging.models import Tag
-
-class RssEntriesByTagFeed(RssEntriesFeed):
-
-    def get_object(self, request, tag):
-        return get_object_or_404(Tag, name__exact=tag)
-
-    def title(self, tag):
-        if not hasattr(self, '_site'):
-            self._site = Site.objects.get_current()
-        return _('%(title)s\'s Weblog: entries tagged "%(tag name)s"') % \
-               {'title': self._site.name, 'tag name': tag.name}
-
-    def description(self, tag):
-        return _('Latest entries for tag "%(tag name)s"') % \
-               {'tag name': tag.name}
-
-    def link(self, tag):
-        if not tag:
-            raise FeedDoesNotExist
-        return reverse('diario-tagged-entry-list', args=[tag.name])
-
-    def get_query_set(self, tag):
-        queryset = Entry.on_site.visible().filter(tags__contains=tag.name)
-        return queryset.order_by('-pub_date')
-
-    def items(self, tag):
-        return self.get_query_set(tag)[:15]
-
-class AtomEntriesByTagFeed(RssEntriesByTagFeed):
-    feed_type = Atom1Feed
-    subtitle = RssEntriesByTagFeed.description
Add a comment to this file

diario/locale/en/LC_MESSAGES/django.mo

Binary file modified.

diario/locale/en/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-05-24 11:08-0300\n"
+"POT-Creation-Date: 2012-06-28 18:33-0300\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"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: admin.py:23
+#: admin.py:34
 msgid "Status"
 msgstr ""
 
-#: admin.py:26
-msgid "Discussion"
-msgstr ""
-
-#: feeds/comments.py:28
-msgid "Latest comments on Weblog"
-msgstr ""
-
-#: feeds/comments.py:35
-#, python-format
-msgid "%(title)s's Weblog comments"
-msgstr ""
-
-#: feeds/comments.py:81
-#, python-format
-msgid "Comments on: %(entry title)s @ %(weblog title)s's Weblog"
-msgstr ""
-
-#: feeds/comments.py:85
-#, python-format
-msgid "Latest comments for \"%(title)s\""
-msgstr ""
-
-#: feeds/entries.py:22
+#: feeds/entries.py:20
 msgid "Latest entries on Weblog"
 msgstr ""
 
-#: feeds/entries.py:29
+#: feeds/entries.py:27
 #, python-format
 msgid "%(title)s's Weblog"
 msgstr ""
 
-#: feeds/entries_by_author.py:32
+#: feeds/entries_by_author.py:31
 #, python-format
 msgid "%(title)s's Weblog: entries by \"%(user name)s\""
 msgstr ""
 
-#: feeds/entries_by_author.py:36
+#: feeds/entries_by_author.py:35
 #, python-format
 msgid "Latest entries by \"%(user name)s\""
 msgstr ""
 
-#: feeds/tagged.py:33
-#, python-format
-msgid "%(title)s's Weblog: entries tagged \"%(tag name)s\""
-msgstr ""
-
-#: feeds/tagged.py:37
-#, python-format
-msgid "Latest entries for tag \"%(tag name)s\""
-msgstr ""
-
-#: models/models.py:30
+#: models/__init__.py:34
 msgid "entry"
 msgstr ""
 
-#: models/models.py:31
+#: models/__init__.py:35
 msgid "entries"
 msgstr ""
 
-#: models/mixins/base.py:54
+#: models/mixins/base.py:43
 msgid "title"
 msgstr ""
 
-#: models/mixins/base.py:55
+#: models/mixins/base.py:44
+msgid "body"
+msgstr ""
+
+#: models/mixins/base.py:45
 msgid "visible"
 msgstr ""
 
-#: models/mixins/base.py:56
-msgid "enable comments"
-msgstr ""
-
-#: models/mixins/base.py:60
-msgid "publish on"
-msgstr ""
-
-#: models/mixins/base.py:62
+#: models/mixins/base.py:46
 msgid "date added"
 msgstr ""
 
-#: models/mixins/base.py:63
+#: models/mixins/base.py:47
 msgid "date modified"
 msgstr ""
 
-#: models/mixins/base.py:65
+#: models/mixins/base.py:49
 msgid "publication date"
 msgstr ""
 
-#: models/mixins/base.py:67
+#: models/mixins/base.py:51
 msgid ""
 "Entries with this field in a future date are only published on that date. "
 "Let blank and this will be automatically set to the current date/time."
 msgstr ""
 
-#: models/mixins/base.py:91
+#: models/mixins/base.py:66
+msgid "author"
+msgstr ""
+
+#: models/mixins/base.py:74
 msgid "slug"
 msgstr ""
 
-#: models/mixins/base.py:93
+#: models/mixins/base.py:76
 msgid ""
 "Automatically built from the title. A slug is a short label generally used "
 "in URLs."
 msgstr ""
 
-#: models/mixins/base.py:103
-msgid "author"
+#: models/mixins/sites.py:21
+msgid "publish on"
 msgstr ""
-
-#: models/mixins/base.py:111
-msgid "body"
-msgstr ""
Add a comment to this file

diario/locale/es/LC_MESSAGES/django.mo

Binary file modified.

diario/locale/es/LC_MESSAGES/django.po

-# Spanish translation of Django Diário
-# Copyright (c) 2007-2008 Ricardo Fuentes, Guilherme Gondim and contributors
-# This file is distributed under the same license as the Diário package.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Guilherme Gondim <semente@taurinus.org>, 2012.
 msgid ""
 msgstr ""
-"Project-Id-Version: \n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-05-24 11:17-0300\n"
-"PO-Revision-Date: 2009-02-03 13:56-0200\n"
-"Last-Translator: Ricardo Fuentes <jirah@jirah.org>\n"
+"Project-Id-Version: Django Diário\n"
+"Report-Msgid-Bugs-To: https://bitbucket.org/semente/django-diario/issues\n"
+"POT-Creation-Date: 2012-06-28 18:33-0300\n"
+"PO-Revision-Date: 2012-06-28 21:20+0000\n"
+"Last-Translator: Guilherme Gondim <semente@taurinus.org>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
 
-#: admin.py:23
+#: admin.py:34
 msgid "Status"
 msgstr "Estado"
 
-#: admin.py:26
-msgid "Discussion"
-msgstr "Discusión"
-
-#: feeds/comments.py:28
-msgid "Latest comments on Weblog"
-msgstr ""
-
-#: feeds/comments.py:35
-#, python-format
-msgid "%(title)s's Weblog comments"
-msgstr ""
-
-#: feeds/comments.py:81
-#, python-format
-msgid "Comments on: %(entry title)s @ %(weblog title)s's Weblog"
-msgstr ""
-
-#: feeds/comments.py:85
-#, python-format
-msgid "Latest comments for \"%(title)s\""
-msgstr ""
-
-#: feeds/entries.py:22
+#: feeds/entries.py:20
 msgid "Latest entries on Weblog"
 msgstr ""
 
-#: feeds/entries.py:29
+#: feeds/entries.py:27
 #, python-format
 msgid "%(title)s's Weblog"
 msgstr ""
 
-#: feeds/entries_by_author.py:32
+#: feeds/entries_by_author.py:31
 #, python-format
 msgid "%(title)s's Weblog: entries by \"%(user name)s\""
 msgstr ""
 
-#: feeds/entries_by_author.py:36
+#: feeds/entries_by_author.py:35
 #, python-format
 msgid "Latest entries by \"%(user name)s\""
 msgstr ""
 
-#: feeds/tagged.py:33
-#, python-format
-msgid "%(title)s's Weblog: entries tagged \"%(tag name)s\""
-msgstr ""
-
-#: feeds/tagged.py:37
-#, python-format
-msgid "Latest entries for tag \"%(tag name)s\""
-msgstr ""
-
-#: models/models.py:30
+#: models/__init__.py:34
 msgid "entry"
 msgstr "entrada"
 
-#: models/models.py:31
+#: models/__init__.py:35
 msgid "entries"
 msgstr "entradas"
 
-#: models/mixins/base.py:54
+#: models/mixins/base.py:43
 msgid "title"
 msgstr "título"
 
-#: models/mixins/base.py:55
+#: models/mixins/base.py:44
+msgid "body"
+msgstr "cuerpo"
+
+#: models/mixins/base.py:45
 msgid "visible"
 msgstr ""
 
-#: models/mixins/base.py:56
-msgid "enable comments"
-msgstr ""
-
-#: models/mixins/base.py:60
-msgid "publish on"
-msgstr "publicar en"
-
-#: models/mixins/base.py:62
+#: models/mixins/base.py:46
 msgid "date added"
 msgstr ""
 
-#: models/mixins/base.py:63
+#: models/mixins/base.py:47
 msgid "date modified"
 msgstr ""
 
-#: models/mixins/base.py:65
+#: models/mixins/base.py:49
 msgid "publication date"
 msgstr ""
 
-#: models/mixins/base.py:67
+#: models/mixins/base.py:51
 msgid ""
 "Entries with this field in a future date are only published on that date. "
 "Let blank and this will be automatically set to the current date/time."
 msgstr ""
 
-#: models/mixins/base.py:91
-msgid "slug"
+#: models/mixins/base.py:66
+msgid "author"
 msgstr ""
 
-#: models/mixins/base.py:93
+#: models/mixins/base.py:74
+msgid "slug"
+msgstr "slug"
+
+#: models/mixins/base.py:76
 msgid ""
 "Automatically built from the title. A slug is a short label generally used "
 "in URLs."
-msgstr ""
-"Construido automaticamente a partir del título. Un slug es una etiqueta "
-"usada en URLs."
+msgstr "Construido automaticamente a partir del título. Un slug es una etiqueta usada en URLs."
 
-#: models/mixins/base.py:103
-msgid "author"
-msgstr ""
-
-#: models/mixins/base.py:111
-msgid "body"
-msgstr "cuerpo"
-
-#~ msgid "Advanced options"
-#~ msgstr "Opciones avanzadas"
-
-#~ msgid "body in HTML"
-#~ msgstr "cuerpo en HTML"
-
-#~ msgid "markup language"
-#~ msgstr "lenguaje de marcación"
-
-#~ msgid "draft"
-#~ msgstr "borrador"
-
-#~ msgid "Drafts are not published."
-#~ msgstr "Borradores no son publicados."
-
-#~ msgid "date published"
-#~ msgstr "fecha de publicación"
-
-#~ 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/mixins/sites.py:21
+msgid "publish on"
+msgstr "publicar en"
Add a comment to this file

diario/locale/fr/LC_MESSAGES/django.mo

Binary file modified.

diario/locale/fr/LC_MESSAGES/django.po

-# French translation of Django Diário
-# Copyright (c) 2007-2008 Bruno Bord, Guilherme Gondim and contributors
-# This file is distributed under the same license as the Diário package.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
 msgid ""
 msgstr ""
-"Project-Id-Version: \n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-05-24 11:17-0300\n"
-"PO-Revision-Date: 2009-02-03 13:57-0200\n"
-"Last-Translator: Bruno Bord <bbord@interfaceip.fr>\n"
-"Language-Team: Bruno Bord <bruno@jehaisleprintemps.net>\n"
-"Language: \n"
+"Project-Id-Version: Django Diário\n"
+"Report-Msgid-Bugs-To: https://bitbucket.org/semente/django-diario/issues\n"
+"POT-Creation-Date: 2012-06-28 18:33-0300\n"
+"PO-Revision-Date: 2012-06-28 21:20+0000\n"
+"Last-Translator: Guilherme Gondim <semente@taurinus.org>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: French\n"
-"X-Poedit-Country: FRANCE\n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: admin.py:23
+#: admin.py:34
 msgid "Status"
 msgstr ""
 
-#: admin.py:26
-msgid "Discussion"
-msgstr ""
-
-#: feeds/comments.py:28
-msgid "Latest comments on Weblog"
-msgstr "Derniers commentaires du blog"
-
-#: feeds/comments.py:35
-#, python-format
-msgid "%(title)s's Weblog comments"
-msgstr ""
-
-#: feeds/comments.py:81
-#, python-format
-msgid "Comments on: %(entry title)s @ %(weblog title)s's Weblog"
-msgstr ""
-
-#: feeds/comments.py:85
-#, fuzzy, python-format
-msgid "Latest comments for \"%(title)s\""
-msgstr "Derniers articles pour le tag \"%(tag name)s\""
-
-#: feeds/entries.py:22
+#: feeds/entries.py:20
 msgid "Latest entries on Weblog"
 msgstr "Derniers articles du blog"
 
-#: feeds/entries.py:29
+#: feeds/entries.py:27
 #, python-format
 msgid "%(title)s's Weblog"
 msgstr "Le blog de %(title)s"
 
-#: feeds/entries_by_author.py:32
-#, fuzzy, python-format
+#: feeds/entries_by_author.py:31
+#, python-format
 msgid "%(title)s's Weblog: entries by \"%(user name)s\""
-msgstr "Le blog de %(title)s : articles avec le tag \"%(tag name)s\""
+msgstr ""
 
-#: feeds/entries_by_author.py:36
-#, fuzzy, python-format
+#: feeds/entries_by_author.py:35
+#, python-format
 msgid "Latest entries by \"%(user name)s\""
-msgstr "Derniers articles pour le tag \"%(tag name)s\""
+msgstr ""
 
-#: feeds/tagged.py:33
-#, python-format
-msgid "%(title)s's Weblog: entries tagged \"%(tag name)s\""
-msgstr "Le blog de %(title)s : articles avec le tag \"%(tag name)s\""
-
-#: feeds/tagged.py:37
-#, python-format
-msgid "Latest entries for tag \"%(tag name)s\""
-msgstr "Derniers articles pour le tag \"%(tag name)s\""
-
-#: models/models.py:30
+#: models/__init__.py:34
 msgid "entry"
 msgstr "article"
 
-#: models/models.py:31
+#: models/__init__.py:35
 msgid "entries"
 msgstr "articles"
 
-#: models/mixins/base.py:54
+#: models/mixins/base.py:43
 msgid "title"
 msgstr "titre"
 
-#: models/mixins/base.py:55
+#: models/mixins/base.py:44
+msgid "body"
+msgstr "corps"
+
+#: models/mixins/base.py:45
 msgid "visible"
 msgstr ""
 
-#: models/mixins/base.py:56
-msgid "enable comments"
-msgstr ""
-
-#: models/mixins/base.py:60
-msgid "publish on"
-msgstr "publié sur"
-
-#: models/mixins/base.py:62
+#: models/mixins/base.py:46
 msgid "date added"
 msgstr ""
 
-#: models/mixins/base.py:63
+#: models/mixins/base.py:47
 msgid "date modified"
 msgstr ""
 
-#: models/mixins/base.py:65
+#: models/mixins/base.py:49
 msgid "publication date"
 msgstr ""
 
-#: models/mixins/base.py:67
+#: models/mixins/base.py:51
 msgid ""
 "Entries with this field in a future date are only published on that date. "
 "Let blank and this will be automatically set to the current date/time."
 msgstr ""
 
-#: models/mixins/base.py:91
+#: models/mixins/base.py:66
+msgid "author"
+msgstr ""
+
+#: models/mixins/base.py:74
 msgid "slug"
 msgstr ""
 
-#: models/mixins/base.py:93
+#: models/mixins/base.py:76
 msgid ""
 "Automatically built from the title. A slug is a short label generally used "
 "in URLs."
-msgstr ""
-"Construit automatiquement à partir du titre. Un \"slug\" est une chaîne "
-"utilisée dans les URLs."
+msgstr "Construit automatiquement à partir du titre. Un \"slug\" est une chaîne utilisée dans les URLs."
 
-#: models/mixins/base.py:103
-msgid "author"
-msgstr ""
-
-#: models/mixins/base.py:111
-msgid "body"
-msgstr "corps"
-
-#, fuzzy
-#~ msgid "Advanced options"
-#~ msgstr "Autres options"
-
-#~ msgid "body in HTML"
-#~ msgstr "corps en HTML"
-
-#~ msgid "markup language"
-#~ msgstr "format de balisage"
-
-#~ msgid "draft"
-#~ msgstr "brouillon"
-
-#~ msgid "Drafts are not published."
-#~ msgstr "Les brouillons ne sont pas publiés."
-
-#~ msgid "date published"
-#~ msgstr "date de publication"
-
-#~ 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/mixins/sites.py:21
+msgid "publish on"
+msgstr "publié sur"
Add a comment to this file

diario/locale/pt_BR/LC_MESSAGES/django.mo

Binary file modified.

diario/locale/pt_BR/LC_MESSAGES/django.po

 # Guilherme Gondim <semente@taurinus.org>, 2012.
 msgid ""
 msgstr ""
-"Project-Id-Version: django-diario\n"
+"Project-Id-Version: Django Diário\n"
 "Report-Msgid-Bugs-To: https://bitbucket.org/semente/django-diario/issues\n"
-"POT-Creation-Date: 2012-05-24 11:08-0300\n"
-"PO-Revision-Date: 2012-05-24 14:28+0000\n"
+"POT-Creation-Date: 2012-06-28 18:33-0300\n"
+"PO-Revision-Date: 2012-06-28 21:20+0000\n"
 "Last-Translator: Guilherme Gondim <semente@taurinus.org>\n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.net/projects/p/django-diario/language/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/django-diario/language/pt_BR/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: pt_BR\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: admin.py:23
+#: admin.py:34
 msgid "Status"
 msgstr "Estado"
 
-#: admin.py:26
-msgid "Discussion"
-msgstr "Discussão"
-
-#: feeds/comments.py:28
-msgid "Latest comments on Weblog"
-msgstr "Últimos comentários no Weblog"
-
-#: feeds/comments.py:35
-#, python-format
-msgid "%(title)s's Weblog comments"
-msgstr "Comentários no Weblog de %(title)s"
-
-#: feeds/comments.py:81
-#, python-format
-msgid "Comments on: %(entry title)s @ %(weblog title)s's Weblog"
-msgstr "Comentários em: %(entry title)s @ %(weblog title)s's Weblog"
-
-#: feeds/comments.py:85
-#, python-format
-msgid "Latest comments for \"%(title)s\""
-msgstr "Últimos comentários para \"%(title)s\""
-
-#: feeds/entries.py:22
+#: feeds/entries.py:20
 msgid "Latest entries on Weblog"
 msgstr "Últimas entradas no Weblog"
 
-#: feeds/entries.py:29
+#: feeds/entries.py:27
 #, python-format
 msgid "%(title)s's Weblog"
 msgstr "%(title)s Weblog"
 
-#: feeds/entries_by_author.py:32
+#: feeds/entries_by_author.py:31
 #, python-format
 msgid "%(title)s's Weblog: entries by \"%(user name)s\""
 msgstr "%(title)s's Weblog: entradas por \"%(user name)s\""
 
-#: feeds/entries_by_author.py:36
+#: feeds/entries_by_author.py:35
 #, python-format
 msgid "Latest entries by \"%(user name)s\""
 msgstr "Últimas entradas por \"%(user name)s\""
 
-#: feeds/tagged.py:33
-#, python-format
-msgid "%(title)s's Weblog: entries tagged \"%(tag name)s\""
-msgstr "Weblog de %(title)s: entradas com a tag \"%(tag name)s\""
-
-#: feeds/tagged.py:37
-#, python-format
-msgid "Latest entries for tag \"%(tag name)s\""
-msgstr "Últimas entradas com a tag \"%(tag name)s\""
-
-#: models/models.py:30
+#: models/__init__.py:34
 msgid "entry"
 msgstr "entrada"
 
-#: models/models.py:31
+#: models/__init__.py:35
 msgid "entries"
 msgstr "entradas"
 
-#: models/mixins/base.py:54
+#: models/mixins/base.py:43
 msgid "title"
 msgstr "título"
 
-#: models/mixins/base.py:55
+#: models/mixins/base.py:44
+msgid "body"
+msgstr "corpo"
+
+#: models/mixins/base.py:45
 msgid "visible"
 msgstr "visível"
 
-#: models/mixins/base.py:56
-msgid "enable comments"
-msgstr "habilitar comentários"
-
-#: models/mixins/base.py:60
-msgid "publish on"
-msgstr "publicar em"
-
-#: models/mixins/base.py:62
+#: models/mixins/base.py:46
 msgid "date added"
 msgstr "data de adição"
 
-#: models/mixins/base.py:63
+#: models/mixins/base.py:47
 msgid "date modified"
 msgstr "data de modificação"
 
-#: models/mixins/base.py:65
+#: models/mixins/base.py:49
 msgid "publication date"
 msgstr "data de publicação"
 
-#: models/mixins/base.py:67
+#: models/mixins/base.py:51
 msgid ""
 "Entries with this field in a future date are only published on that date. "
 "Let blank and this will be automatically set to the current date/time."
 msgstr "Entradas com este campo em uma data no futuro serão publicadas somente nesta data. Deixe em branco e o campo será automaticamente preenchido com a data/hora corrente."
 
-#: models/mixins/base.py:91
+#: models/mixins/base.py:66
+msgid "author"
+msgstr "autor"
+
+#: models/mixins/base.py:74
 msgid "slug"
 msgstr "slug"
 
-#: models/mixins/base.py:93
+#: models/mixins/base.py:76
 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."
 
-#: models/mixins/base.py:103
-msgid "author"
-msgstr "autor"
-
-#: models/mixins/base.py:111
-msgid "body"
-msgstr "corpo"
+#: models/mixins/sites.py:21
+msgid "publish on"
+msgstr "publicar em"
Add a comment to this file

diario/locale/ru/LC_MESSAGES/django.mo

Binary file modified.

diario/locale/ru/LC_MESSAGES/django.po

-# Russian translation for Django Diário.
-# Copyright (c) 2009 Andy Mikhailenko, Guilherme Gondim
-# This file is distributed under the same license as the Diário package.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
 msgid ""
 msgstr ""
-"Project-Id-Version: \n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-05-24 11:17-0300\n"
-"PO-Revision-Date: 2009-02-03 14:01-0200\n"
-"Last-Translator: Andy Mikhailenko <neithere@gmail.com>\n"
-"Language-Team: Russian <neithere@gmail.com>\n"
-"Language: ru\n"
+"Project-Id-Version: Django Diário\n"
+"Report-Msgid-Bugs-To: https://bitbucket.org/semente/django-diario/issues\n"
+"POT-Creation-Date: 2012-06-28 18:33-0300\n"
+"PO-Revision-Date: 2012-06-28 21:20+0000\n"
+"Last-Translator: Guilherme Gondim <semente@taurinus.org>\n"
+"Language-Team: Russian (http://www.transifex.com/projects/p/django-diario/language/ru/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: ru\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
 
-#: admin.py:23
+#: admin.py:34
 msgid "Status"
 msgstr "Состояние"
 
-#: admin.py:26
-msgid "Discussion"
-msgstr "Дискуссия"
-
-#: feeds/comments.py:28
-msgid "Latest comments on Weblog"
-msgstr "Последние комментарии в блоге"
-
-#: feeds/comments.py:35
-#, python-format
-msgid "%(title)s's Weblog comments"
-msgstr "Комментарии к блогу %(title)s"
-
-#: feeds/comments.py:81
-#, python-format
-msgid "Comments on: %(entry title)s @ %(weblog title)s's Weblog"
-msgstr ""
-
-#: feeds/comments.py:85
-#, fuzzy, python-format
-msgid "Latest comments for \"%(title)s\""
-msgstr "Последние записи с меткой \"%(tag name)s\""
-
-#: feeds/entries.py:22
+#: feeds/entries.py:20
 msgid "Latest entries on Weblog"
 msgstr "Последнии записи в блоге"
 
-#: feeds/entries.py:29
+#: feeds/entries.py:27
 #, python-format
 msgid "%(title)s's Weblog"
 msgstr "Блог %(title)s"
 
-#: feeds/entries_by_author.py:32
-#, fuzzy, python-format
+#: feeds/entries_by_author.py:31
+#, python-format
 msgid "%(title)s's Weblog: entries by \"%(user name)s\""
-msgstr "Блог %(title)s: записи с меткой \"%(tag name)s\""
+msgstr ""
 
-#: feeds/entries_by_author.py:36
-#, fuzzy, python-format
+#: feeds/entries_by_author.py:35
+#, python-format
 msgid "Latest entries by \"%(user name)s\""
-msgstr "Последние записи с меткой \"%(tag name)s\""
+msgstr ""
 
-#: feeds/tagged.py:33
-#, python-format
-msgid "%(title)s's Weblog: entries tagged \"%(tag name)s\""
-msgstr "Блог %(title)s: записи с меткой \"%(tag name)s\""
-
-#: feeds/tagged.py:37
-#, python-format
-msgid "Latest entries for tag \"%(tag name)s\""
-msgstr "Последние записи с меткой \"%(tag name)s\""
-
-#: models/models.py:30
+#: models/__init__.py:34
 msgid "entry"
 msgstr "запись"
 
-#: models/models.py:31
+#: models/__init__.py:35
 msgid "entries"
 msgstr "записи"
 
-#: models/mixins/base.py:54
+#: models/mixins/base.py:43
 msgid "title"
 msgstr "заголовок"
 
-#: models/mixins/base.py:55
+#: models/mixins/base.py:44
+msgid "body"
+msgstr "текст"
+
+#: models/mixins/base.py:45
 msgid "visible"
 msgstr ""
 
-#: models/mixins/base.py:56
-msgid "enable comments"
-msgstr "разрешить комментарии"
-
-#: models/mixins/base.py:60
-msgid "publish on"
-msgstr "опубликовать в"
-
-#: models/mixins/base.py:62
+#: models/mixins/base.py:46
 msgid "date added"
 msgstr ""
 
-#: models/mixins/base.py:63
+#: models/mixins/base.py:47
 msgid "date modified"
 msgstr ""
 
-#: models/mixins/base.py:65
+#: models/mixins/base.py:49
 msgid "publication date"
 msgstr ""
 
-#: models/mixins/base.py:67
+#: models/mixins/base.py:51
 msgid ""
 "Entries with this field in a future date are only published on that date. "
 "Let blank and this will be automatically set to the current date/time."
 msgstr ""
 
-#: models/mixins/base.py:91
+#: models/mixins/base.py:66
+msgid "author"
+msgstr ""
+
+#: models/mixins/base.py:74
 msgid "slug"
 msgstr "slug"
 
-#: models/mixins/base.py:93
+#: models/mixins/base.py:76
 msgid ""
 "Automatically built from the title. A slug is a short label generally used "
 "in URLs."
-msgstr ""
-"Автоматически создается из заголовка. Slug -- это короткая надпись, обычно "
-"используемая в ссылках. "
+msgstr "Автоматически создается из заголовка. Slug -- это короткая надпись, обычно используемая в ссылках. "
 
-#: models/mixins/base.py:103
-msgid "author"
-msgstr ""
-
-#: models/mixins/base.py:111
-msgid "body"
-msgstr "текст"
-
-#~ msgid "Advanced options"
-#~ msgstr "Дополнительные настройки"
-
-#~ msgid "Raw text"
-#~ msgstr "Простой текст"
-
-#~ msgid "body in HTML"
-#~ msgstr "текст в HTML"
-
-#~ msgid "markup language"
-#~ msgstr "язык разметки"
-
-#~ msgid "Select \"Raw text\" to enter HTML or apply markup elsewhere."
-#~ msgstr ""
-#~ "Выберите \"Простой текст\", чтобы писать сразу в HTML или обработать "
-#~ "разметку в другом месте."
-
-#~ msgid "draft"
-#~ msgstr "черновик"
-
-#~ msgid "Drafts are not published."
-#~ msgstr "Черновики не публикуются."
-
-#~ msgid "date published"
-#~ msgstr "дата публикации"
-
-#~ msgid "Entries in future dates are only published on correct date."
-#~ msgstr "Записи с будущими датами публикуются только в означенный день."
+#: models/mixins/sites.py:21
+msgid "publish on"
+msgstr "опубликовать в"
Add a comment to this file

diario/locale/tr/LC_MESSAGES/django.mo

Binary file added.

diario/locale/tr/LC_MESSAGES/django.po

+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: Django Diário\n"
+"Report-Msgid-Bugs-To: https://bitbucket.org/semente/django-diario/issues\n"
+"POT-Creation-Date: 2012-06-28 18:33-0300\n"
+"PO-Revision-Date: 2012-06-28 21:20+0000\n"
+"Last-Translator: Guilherme Gondim <semente@taurinus.org>\n"
+"Language-Team: Turkish (http://www.transifex.com/projects/p/django-diario/language/tr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: tr\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#: admin.py:34
+msgid "Status"
+msgstr ""
+
+#: feeds/entries.py:20
+msgid "Latest entries on Weblog"
+msgstr ""
+
+#: feeds/entries.py:27
+#, python-format
+msgid "%(title)s's Weblog"
+msgstr ""
+
+#: feeds/entries_by_author.py:31
+#, python-format
+msgid "%(title)s's Weblog: entries by \"%(user name)s\""
+msgstr ""
+
+#: feeds/entries_by_author.py:35
+#, python-format
+msgid "Latest entries by \"%(user name)s\""
+msgstr ""
+
+#: models/__init__.py:34
+msgid "entry"
+msgstr ""
+
+#: models/__init__.py:35
+msgid "entries"
+msgstr ""
+
+#: models/mixins/base.py:43
+msgid "title"
+msgstr ""
+
+#: models/mixins/base.py:44
+msgid "body"
+msgstr ""
+
+#: models/mixins/base.py:45
+msgid "visible"
+msgstr ""
+
+#: models/mixins/base.py:46
+msgid "date added"
+msgstr ""
+
+#: models/mixins/base.py:47
+msgid "date modified"
+msgstr ""
+
+#: models/mixins/base.py:49
+msgid "publication date"
+msgstr ""
+
+#: models/mixins/base.py:51
+msgid ""
+"Entries with this field in a future date are only published on that date. "
+"Let blank and this will be automatically set to the current date/time."
+msgstr ""
+
+#: models/mixins/base.py:66
+msgid "author"
+msgstr ""
+
+#: models/mixins/base.py:74
+msgid "slug"
+msgstr ""
+
+#: models/mixins/base.py:76
+msgid ""
+"Automatically built from the title. A slug is a short label generally used "
+"in URLs."
+msgstr ""
+
+#: models/mixins/sites.py:21
+msgid "publish on"
+msgstr ""

diario/migrations/0001_initial.py

-# -*- 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 'DefaultEntry'
-        db.create_table('diario_defaultentry', (
-            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('title', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('visible', self.gf('django.db.models.fields.BooleanField')(default=True)),
-            ('enable_comments', self.gf('django.db.models.fields.BooleanField')(default=True)),
-            ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
-            ('pub_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
-            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
-            ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
-            ('body', self.gf('django.db.models.fields.TextField')()),
-        ))
-        db.send_create_signal('diario', ['DefaultEntry'])
-
-        # Adding M2M table for field publish_on on 'DefaultEntry'
-        db.create_table('diario_defaultentry_publish_on', (
-            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
-            ('defaultentry', models.ForeignKey(orm['diario.defaultentry'], null=False)),
-            ('site', models.ForeignKey(orm['sites.site'], null=False))
-        ))
-        db.create_unique('diario_defaultentry_publish_on', ['defaultentry_id', 'site_id'])
-
-    def backwards(self, orm):
-        # Deleting model 'DefaultEntry'
-        db.delete_table('diario_defaultentry')
-
-        # Removing M2M table for field publish_on on 'DefaultEntry'
-        db.delete_table('diario_defaultentry_publish_on')
-
-    models = {
-        'auth.group': {
-            'Meta': {'object_name': 'Group'},
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
-            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
-        },
-        'auth.permission': {
-            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
-            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
-        },
-        'auth.user': {
-            'Meta': {'object_name': 'User'},
-            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
-            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
-            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
-            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
-            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
-            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
-            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
-        },
-        'contenttypes.contenttype': {
-            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
-            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        'diario.defaultentry': {
-            'Meta': {'ordering': "('-pub_date',)", 'object_name': 'DefaultEntry'},
-            'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
-            'body': ('django.db.models.fields.TextField', [], {}),
-            'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'pub_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
-            'publish_on': ('django.db.models.fields.related.ManyToManyField', [], {'default': '[1]', 'to': "orm['sites.Site']", 'symmetrical': 'False'}),
-            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
-            'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
-        },
-        'sites.site': {
-            'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
-            'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
-        }
-    }
-
-    complete_apps = ['diario']

diario/migrations/0002_auto__del_field_defaultentry_date_created__add_field_defaultentry_date.py

-# -*- 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):
-        # Deleting field 'DefaultEntry.date_created'
-        db.delete_column('diario_defaultentry', 'date_created')
-
-        # Adding field 'DefaultEntry.date_added'
-        db.add_column('diario_defaultentry', 'date_added',
-                      self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2012, 4, 14, 0, 0), blank=True),
-                      keep_default=False)
-
-        # Adding field 'DefaultEntry.date_modified'
-        db.add_column('diario_defaultentry', 'date_modified',
-                      self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2012, 4, 14, 0, 0), blank=True),
-                      keep_default=False)
-
-    def backwards(self, orm):
-        # Adding field 'DefaultEntry.date_created'
-        db.add_column('diario_defaultentry', 'date_created',
-                      self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2012, 4, 14, 0, 0), blank=True),
-                      keep_default=False)
-
-        # Deleting field 'DefaultEntry.date_added'
-        db.delete_column('diario_defaultentry', 'date_added')
-
-        # Deleting field 'DefaultEntry.date_modified'
-        db.delete_column('diario_defaultentry', 'date_modified')
-
-    models = {
-        'auth.group': {
-            'Meta': {'object_name': 'Group'},
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
-            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
-        },
-        'auth.permission': {
-            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
-            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
-        },
-        'auth.user': {
-            'Meta': {'object_name': 'User'},
-            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
-            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
-            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
-            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
-            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
-            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
-            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
-        },
-        'contenttypes.contenttype': {
-            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
-            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        'diario.defaultentry': {
-            'Meta': {'ordering': "('-pub_date',)", 'object_name': 'DefaultEntry'},
-            'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
-            'body': ('django.db.models.fields.TextField', [], {}),
-            'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'pub_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
-            'publish_on': ('django.db.models.fields.related.ManyToManyField', [], {'default': '[1]', 'to': "orm['sites.Site']", 'symmetrical': 'False'}),
-            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
-            'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
-        },
-        'sites.site': {
-            'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
-            'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
-        }
-    }
-
-    complete_apps = ['diario']
Add a comment to this file

diario/migrations/__init__.py

Empty file removed.

diario/models/__init__.py

 #  Software Foundation. See the file README for copying conditions.
 #
 
-from django.db.models import loading
+from django.db.models import permalink
+from django.utils.translation import ugettext_lazy as _
 
-from diario.settings import ENTRY_CLASS
-from diario.models.models import BaseEntry
+from diario.models.managers import EntryManager
+from diario.models.mixins.base import *
 
 
-__all__ = ['Entry', 'BaseEntry']
+__all__ = [
+    'BaseEntryModel', 'EntryManager', 'CurrentSiteEntryManager',
+    'BasicEntryMixin', 'AuthorMixin', 'SiteMixin', 'SlugMixin',
+]
 
 
-def get_entry_model(name=ENTRY_CLASS):
-    module_path = '.'.join(ENTRY_CLASS.split('.')[:-1])
-    class_name = ENTRY_CLASS.split('.')[-1:][0]
-    module = __import__(module_path, fromlist=[class_name])
-    return getattr(module, class_name)
+class BaseEntryModel(SlugMixin, AuthorMixin, BasicEntryMixin):
 
+    # Managers
+    objects = EntryManager()
 
-class Entry(get_entry_model()):
-    pass
+    class Meta:
+        abstract = True
+        get_latest_by = 'pub_date'
+        ordering = ('-pub_date',)
+        verbose_name = _('entry')
+        verbose_name_plural = _('entries')
+
+    def __unicode__(self):
+        return self.title
+
+    @permalink
+    def get_absolute_url(self):
+        return ('diario-entry-detail', None, {
+            'year' : str(self.pub_date.year),
+            'month': str(self.pub_date.month).zfill(2),
+            'day'  : str(self.pub_date.day).zfill(2),
+            'slug' : str(self.slug)
+        })

diario/models/managers.py

         queryset = self.get_query_set()
         return queryset.filter(author__username=username, *args, **kwargs)
 
-    def tagged(self, tag_instance, *args, **kwargs):
-        """Returns a QuerySet for a tag."""
-        from tagging.models import TaggedItem
-        queryset = self.get_query_set()
-        return TaggedItem.objects.get_by_model(queryset, tag_instance, *args, **kwargs)
-
     def visible(self, *args, **kwargs):
         queryset = self.get_query_set()
         return queryset.filter(visible=True, pub_date__lte=datetime.now, *args, **kwargs)
 class EntryManager(Manager, BaseEntryManager):
     pass
 
+
 class CurrentSiteEntryManager(CurrentSiteManager, BaseEntryManager):
     pass

diario/models/mixins/__init__.py

 #  Software Foundation. See the file README for copying conditions.
 #
 
-from diario.models.mixins.base import *
-from diario.models.mixins.tagging import *
+from diario.models.mixins.base import BasicEntryMixin, AuthorMixin, SlugMixin
+from diario.models.mixins.sites import SiteMixin
+