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.
This commit is contained in:
Aymeric Augustin 2013-09-21 22:50:33 +02:00
parent 56743cf9e3
commit 5444a9c683
2 changed files with 22 additions and 1 deletions

View file

@ -8,7 +8,16 @@ class EventForm(forms.Form):
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__'