from django import forms import datetime class NoticeForm(forms.Form): date_formats = ['%d.%m.%Y', '%d.%m.%y'] notice_title = forms.CharField(label='Titel', max_length=80) notice_text = forms.CharField(label='Text', max_length=400) pub_start = forms.DateField(label='Von', input_formats=date_formats, initial=datetime.date.today) pub_end = forms.DateField(label='Bis', input_formats=date_formats, initial=datetime.date.today)