This commit is contained in:
2020-09-06 08:38:17 +00:00
20 changed files with 241 additions and 188 deletions

View File

@@ -21,7 +21,10 @@ class MyPostForm(forms.ModelForm):
class MyNewsForm(MyPostForm):
class Meta:
model = News
fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author', 'public_date']
fields = [
'title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author', 'public_date',
'is_pinned', 'is_hidden',
]
widgets = {'body': CKEditorUploadingWidget(config_name='default')}
@@ -34,7 +37,7 @@ class MyEventForm(MyPostForm):
model = Event
fields = [
'title', 'subtitle', 'tags', 'image', 'body', 'event_start', 'event_end',
'event_place', 'slug', 'author', 'public_date',
'event_place', 'slug', 'author', 'public_date', 'is_pinned',
]
widgets = {'body': CKEditorUploadingWidget(config_name='default')}