mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 13:34:00 +03:00
Fix for python 3 support - thanks @Linovia
This commit is contained in:
parent
bfff356dd3
commit
956a65f5af
|
@ -448,7 +448,7 @@ class DateField(WritableField):
|
||||||
form_field_class = forms.DateField
|
form_field_class = forms.DateField
|
||||||
|
|
||||||
default_error_messages = {
|
default_error_messages = {
|
||||||
'invalid': _(u"Date has wrong format. Use one of these formats instead: %s"),
|
'invalid': _("Date has wrong format. Use one of these formats instead: %s"),
|
||||||
}
|
}
|
||||||
empty = None
|
empty = None
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ class DateTimeField(WritableField):
|
||||||
form_field_class = forms.DateTimeField
|
form_field_class = forms.DateTimeField
|
||||||
|
|
||||||
default_error_messages = {
|
default_error_messages = {
|
||||||
'invalid': _(u"Datetime has wrong format. Use one of these formats instead: %s"),
|
'invalid': _("Datetime has wrong format. Use one of these formats instead: %s"),
|
||||||
}
|
}
|
||||||
empty = None
|
empty = None
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ class TimeField(WritableField):
|
||||||
form_field_class = forms.TimeField
|
form_field_class = forms.TimeField
|
||||||
|
|
||||||
default_error_messages = {
|
default_error_messages = {
|
||||||
'invalid': _(u"Time has wrong format. Use one of these formats instead: %s"),
|
'invalid': _("Time has wrong format. Use one of these formats instead: %s"),
|
||||||
}
|
}
|
||||||
empty = None
|
empty = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user