mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
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:
parent
56743cf9e3
commit
5444a9c683
2 changed files with 22 additions and 1 deletions
|
@ -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__'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue