You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

forms.py 533B

12345678910111213
  1. from django import forms
  2. import datetime
  3. class NoticeForm(forms.Form):
  4. date_formats = ['%d.%m.%Y', '%d.%m.%y']
  5. title = forms.CharField(label='Titel', max_length=80)
  6. text = forms.CharField(label='Text', max_length=400)
  7. start = forms.DateField(label='Von',
  8. input_formats=date_formats,
  9. initial=datetime.date.today)
  10. end = forms.DateField(label='Bis',
  11. input_formats=date_formats,
  12. initial=datetime.date.today)