Commits

semente  committed 12e17d2

publish_on now have the current site as default value.

--HG--
extra : convert_revision : svn%3Aea932676-bf3b-0410-9f11-03e9079df846/trunk%40139

  • Participants
  • Parent commits a38a596

Comments (0)

Files changed (1)

File diario/models.py

         help_text=_('Entries in future dates are only published on '
                     'correct date.'),
     )
-    publish_on = models.ManyToManyField(Site, verbose_name=_('publish on'))
+    publish_on = models.ManyToManyField(
+        Site,
+        default=[Site.objects.get_current().id],
+        verbose_name=_('publish on')
+    )
     enable_comments = models.BooleanField(_('enable comments'), default=True)
 
     if HAS_TAG_SUPPORT: