diff options
-rw-r--r-- | app/pages/admin.py | 2 | ||||
-rw-r--r-- | app/pages/models.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/pages/admin.py b/app/pages/admin.py index 314b47e..3c7d900 100644 --- a/app/pages/admin.py +++ b/app/pages/admin.py @@ -25,7 +25,7 @@ class PageAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ('title',)} fieldsets = ( ('Page', { - 'fields': ('title', 'sub_title', 'body_markdown', ('build', 'enable_comments'), ('site','slug', 'path', 'app'), 'featured_image'), + 'fields': ('title', 'sub_title', 'body_markdown', ('build', 'enable_comments'), ('site','slug', 'path', 'app'), 'featured_image', 'pub_date'), 'classes': ('show', 'extrapretty', 'wide') }), ('Metadata', { diff --git a/app/pages/models.py b/app/pages/models.py index d3473a6..0c27cee 100644 --- a/app/pages/models.py +++ b/app/pages/models.py @@ -21,6 +21,7 @@ class Page(models.Model): enable_comments = models.BooleanField(default=False) site = models.ForeignKey(Site, on_delete=models.CASCADE) featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) + pub_date = models.DateTimeField('Date published', null=True, blank=True) def __str__(self): return self.title |