1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
django/tests/timezones/forms.py
Aymeric Augustin 5444a9c683 Fixed #21074 -- Added tests for localized datetime fields.
Fields must render values in the current time zone.

This commit only contains tests because this ticket was just a symptom of
a regression from #18777 that was fixed separately.
2013-09-21 23:10:14 +02:00

24 lines
523 B
Python

from django import forms
from .models import Event
class EventForm(forms.Form):
dt = forms.DateTimeField()
class EventSplitForm(forms.Form):
dt = forms.SplitDateTimeField()
class EventLocalizedForm(forms.Form):
dt = forms.DateTimeField(localize=True)
class EventModelForm(forms.ModelForm):
class Meta:
model = Event
fields = '__all__'
class EventLocalizedModelForm(forms.ModelForm):
class Meta:
model = Event
fields = '__all__'
localized_fields = '__all__'