public_date
This commit is contained in:
@@ -7,7 +7,7 @@ from .models import Post, Event, News, FetMeeting
|
|||||||
class MyPostForm(forms.ModelForm):
|
class MyPostForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Post
|
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')}
|
widgets = {'body': CKEditorUploadingWidget(config_name='default')}
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ class MyPostForm(forms.ModelForm):
|
|||||||
class MyNewsForm(MyPostForm):
|
class MyNewsForm(MyPostForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = News
|
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')}
|
widgets = {'body': CKEditorUploadingWidget(config_name='default')}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ class MyEventForm(MyPostForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Event
|
model = Event
|
||||||
fields = ['title', 'subtitle', 'tags', 'image', 'body',
|
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')}
|
widgets = {'body': CKEditorUploadingWidget(config_name='default')}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ class MyEventForm(MyPostForm):
|
|||||||
class MyFetMeetingForm(MyEventForm):
|
class MyFetMeetingForm(MyEventForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = FetMeeting
|
model = FetMeeting
|
||||||
fields = ['event_start', 'event_end', 'tags']
|
fields = ['event_start', 'event_end', 'tags', 'has_agenda']
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs) # to get the self.fields set
|
super().__init__(*args, **kwargs) # to get the self.fields set
|
||||||
|
|||||||
Reference in New Issue
Block a user