public_date

This commit is contained in:
2020-09-02 19:35:29 +00:00
parent dc1e402e4d
commit 099cb8a987

View File

@@ -7,7 +7,7 @@ from .models import Post, Event, News, FetMeeting
class MyPostForm(forms.ModelForm):
class Meta:
model = Post
fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author']
fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author','public_date']
widgets = {'body': CKEditorUploadingWidget(config_name='default')}
@@ -21,7 +21,7 @@ class MyPostForm(forms.ModelForm):
class MyNewsForm(MyPostForm):
class Meta:
model = News
fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author']
fields = ['title', 'subtitle', 'tags', 'image', 'body', 'slug', 'author','public_date']
widgets = {'body': CKEditorUploadingWidget(config_name='default')}
@@ -33,7 +33,7 @@ class MyEventForm(MyPostForm):
class Meta:
model = Event
fields = ['title', 'subtitle', 'tags', 'image', 'body',
'event_start', 'event_end', 'event_place', 'slug', 'author']
'event_start', 'event_end', 'event_place', 'slug', 'author','public_date']
widgets = {'body': CKEditorUploadingWidget(config_name='default')}
@@ -50,7 +50,7 @@ class MyEventForm(MyPostForm):
class MyFetMeetingForm(MyEventForm):
class Meta:
model = FetMeeting
fields = ['event_start', 'event_end', 'tags']
fields = ['event_start', 'event_end', 'tags', 'has_agenda']
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) # to get the self.fields set