Solutions for MEIM
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 424B

123456789
  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', input_formats=date_formats, initial=datetime.date.today)
  8. end = forms.DateField(label='Bis', input_formats=date_formats, initial=datetime.date.today)