12345678910111213141516171819 |
- import datetime
- from django import forms
- from .widgets import DatePickerWidget
- class CreateEventForm(forms.Form):
- event_name = forms.CharField(label='Event name', max_length=100)
- event_date = forms.Field(label='Event date', widget=DatePickerWidget)
- start_time = forms.TimeField(label='Start time', initial=datetime.time(9, 0))
- end_time = forms.TimeField(label='End time', initial=datetime.time(20, 0))
- class LoginForm(forms.Form):
- username = forms.CharField(label='Username', max_length=100)
- password = forms.CharField(label='Password', max_length=100, widget=forms.PasswordInput, required=False)
- class UpdateSlotsForm(forms.Form):
- slots = forms.CharField(label='Slots', max_length=100)
|