diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-25 15:34:01 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-25 15:34:01 -0500 |
commit | c7686843c06794a0e4367a33d5a93b3b33bd9f3c (patch) | |
tree | a963dd5ab1ccc94d547b275eb329d89b1ac402d2 /app | |
parent | a5b9a5506eaecd79bd5742cb76ff877bc7a08f07 (diff) |
fixed a bug adding pages to related.
Diffstat (limited to 'app')
-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 |