Commits

Anonymous committed 3a4d4c2 Merge

merged

Comments (0)

Files changed (2)

cmsplugin_advancednews/models.py

                         null=True, blank=True, default=None)
 
     is_published = models.BooleanField(_('Published'), default=False)
-    pub_date = models.DateTimeField(_('Publication date'), default=datetime.datetime.now())
+    pub_date = models.DateTimeField(_('Publication date'),
+            default=datetime.datetime.now())
 
     created = models.DateTimeField(auto_now_add=True, editable=False)
     updated = models.DateTimeField(auto_now=True, editable=False)
                     <br/>Select Available Plutins > Text > Add a plugin'))
 
     translations = TranslatedFields(
-        title = models.CharField(verbose_name=_('Title'), max_length=255,
+        title=models.CharField(verbose_name=_('Title'), max_length=255,
             help_text=_('Title of the news item')),
-        excerpt = models.TextField(verbose_name=_('Excerpt'), blank=True,
+        excerpt=models.TextField(verbose_name=_('Excerpt'), blank=True,
             help_text=_('Short exceprt of the new item. Will be shown on the news list.'))
     )
 
+    
     published = PublishedNewsManager()
     objects = TranslationManager()
 
+    
     class Meta:
         verbose_name = _('News')
         verbose_name_plural = _('News')
 
     def __unicode__(self):
         return self.lazy_translation_getter('title', 'New: %s' % self.id)
+            
+        
 
 
 
     Category
     """
 
-    pub_date        = models.DateTimeField(_('Publication date'), default=datetime.datetime.now())
-    created         = models.DateTimeField(auto_now_add=True, editable=False)
-    updated         = models.DateTimeField(auto_now=True, editable=False)
+    pub_date = models.DateTimeField(_('Publication date'),
+            default=datetime.datetime.now())
+    created = models.DateTimeField(auto_now_add=True, editable=False)
+    updated = models.DateTimeField(auto_now=True, editable=False)
 
     translations = TranslatedFields(
         title = models.CharField(_('Title'), max_length=255),
     )
 
+    
     class Meta:
         verbose_name = _('Category')
         verbose_name_plural = _('Categories')
         ordering = ('-pub_date', )
 
-    def __unicode__(self):
+    
+    def __unicode__(self):        
         return self.lazy_translation_getter('title', 'Category: %s' % self.id)
 
 
 class LatestAdvancedNewsPlugin(CMSPlugin):
     """ Model for the settings when using the latest news cms plugin. """
 
+    
     category = models.ForeignKey(Category, null=True, blank=True, default=None)
     limit = models.PositiveIntegerField(_('Number of news items to show'),
                                         help_text=_('Limits the number of items that will be displayed'))
File contents unchanged.