Disabled possibility of change publication date
This commit is contained in:
parent
957489bb50
commit
9879b4b275
|
@ -19,12 +19,13 @@ class PageForm(FlatpageForm):
|
|||
class PageAdmin(FlatPageAdmin):
|
||||
form = PageForm
|
||||
|
||||
list_display = ('url', 'title', 'pub_date', 'enable_comments', 'author')
|
||||
list_display = ('url', 'title', 'pub_date', 'modified_date',
|
||||
'enable_comments', 'author')
|
||||
list_display_links = ('url', 'title')
|
||||
fieldsets = (
|
||||
(None, {'fields': ('url', 'title', 'content')}),
|
||||
(_('Extra'),
|
||||
{'classes': ('collapse closed',), 'fields': ('links', 'pub_date')}),
|
||||
{'classes': ('collapse closed',), 'fields': ('links',)}),
|
||||
|
||||
(_('Advanced options'),
|
||||
{'classes': ('collapse closed',),
|
||||
|
|
|
@ -12,8 +12,8 @@ class Page(FlatPage):
|
|||
links = models.ManyToManyField('Page', related_name='superpages',
|
||||
blank=True, null=True)
|
||||
author = models.ForeignKey(User, verbose_name=_('author'))
|
||||
pub_date = models.DateTimeField(_('publication date'),
|
||||
default=datetime.datetime.now)
|
||||
pub_date = models.DateTimeField(_('publication date'), auto_now_add=True)
|
||||
modified_date = models.DateTimeField(_('last update date'), auto_now=True)
|
||||
# Fields for Search Engine Optimization
|
||||
meta_keywords = models.CharField(_('meta keywords'), blank=True,
|
||||
max_length=255)
|
||||
|
|
Loading…
Reference in New Issue