mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Remove datetime_parser argument from DateTimeField
This commit is contained in:
parent
6d79ea2cde
commit
6ce9e3baf0
|
@ -891,11 +891,10 @@ class DateTimeField(Field):
|
|||
default_timezone = timezone.get_default_timezone() if settings.USE_TZ else None
|
||||
datetime_parser = datetime.datetime.strptime
|
||||
|
||||
def __init__(self, format=empty, datetime_parser=None, input_formats=None, default_timezone=None, *args, **kwargs):
|
||||
def __init__(self, format=empty, input_formats=None, default_timezone=None, *args, **kwargs):
|
||||
self.format = format if format is not empty else self.format
|
||||
self.input_formats = input_formats if input_formats is not None else self.input_formats
|
||||
self.default_timezone = default_timezone if default_timezone is not None else self.default_timezone
|
||||
self.datetime_parser = datetime_parser if datetime_parser is not None else self.datetime_parser
|
||||
super(DateTimeField, self).__init__(*args, **kwargs)
|
||||
|
||||
def enforce_timezone(self, value):
|
||||
|
|
Loading…
Reference in New Issue
Block a user