2011-11-18 21:01:06 +08:00
|
|
|
from django import forms
|
|
|
|
|
|
|
|
from .models import Event
|
|
|
|
|
2013-11-03 05:34:05 +08:00
|
|
|
|
2011-11-18 21:01:06 +08:00
|
|
|
class EventForm(forms.Form):
|
|
|
|
dt = forms.DateTimeField()
|
|
|
|
|
2013-11-03 05:34:05 +08:00
|
|
|
|
2011-11-18 21:01:06 +08:00
|
|
|
class EventSplitForm(forms.Form):
|
|
|
|
dt = forms.SplitDateTimeField()
|
|
|
|
|
2013-11-03 05:34:05 +08:00
|
|
|
|
2013-09-22 04:50:33 +08:00
|
|
|
class EventLocalizedForm(forms.Form):
|
|
|
|
dt = forms.DateTimeField(localize=True)
|
|
|
|
|
2013-11-03 05:34:05 +08:00
|
|
|
|
2011-11-18 21:01:06 +08:00
|
|
|
class EventModelForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Event
|
2013-02-22 05:56:55 +08:00
|
|
|
fields = "__all__"
|
2013-09-22 04:50:33 +08:00
|
|
|
|
2013-11-03 05:34:05 +08:00
|
|
|
|
2013-09-22 04:50:33 +08:00
|
|
|
class EventLocalizedModelForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Event
|
|
|
|
fields = "__all__"
|
|
|
|
localized_fields = "__all__"
|