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