add initial #fachschaft when a new fet-meeting is created.
This commit is contained in:
@@ -2,6 +2,7 @@ from django import forms
|
|||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from ckeditor_uploader.widgets import CKEditorUploadingWidget
|
from ckeditor_uploader.widgets import CKEditorUploadingWidget
|
||||||
|
from taggit.models import Tag
|
||||||
|
|
||||||
from .models import Post, Event, News, FetMeeting
|
from .models import Post, Event, News, FetMeeting
|
||||||
|
|
||||||
@@ -91,7 +92,6 @@ class MyFetMeetingForm(MyEventForm):
|
|||||||
# agenda_html = forms.CharField(widget = forms.TextInput())
|
# agenda_html = forms.CharField(widget = forms.TextInput())
|
||||||
class Meta:
|
class Meta:
|
||||||
model = FetMeeting
|
model = FetMeeting
|
||||||
|
|
||||||
fields = ['event_start', 'event_end', 'tags', 'has_agenda', 'has_protocol']
|
fields = ['event_start', 'event_end', 'tags', 'has_agenda', 'has_protocol']
|
||||||
labels = {
|
labels = {
|
||||||
'event_start': _('Start der Sitzung'),
|
'event_start': _('Start der Sitzung'),
|
||||||
@@ -112,3 +112,8 @@ class MyFetMeetingForm(MyEventForm):
|
|||||||
|
|
||||||
self.fields['has_agenda'].initial = True
|
self.fields['has_agenda'].initial = True
|
||||||
self.fields['has_protocol'].initial = True
|
self.fields['has_protocol'].initial = True
|
||||||
|
|
||||||
|
tags = []
|
||||||
|
tags.append(Tag())
|
||||||
|
tags[0].name = "fachschaft"
|
||||||
|
self.fields['tags'].initial = tags
|
||||||
|
|||||||
Reference in New Issue
Block a user