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 572B

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