Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pyston/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from django.http.response import HttpResponse, HttpResponseBase
from django.utils.decorators import classonlymethod
from django.utils.encoding import force_text
from django.db.models.fields import DateTimeField
from django.http.response import Http404
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext_lazy as _
Expand All @@ -32,7 +31,7 @@
ResourceNotFoundException, NotAllowedMethodException, DuplicateEntryException,
UnsupportedMediaTypeException, MimerDataException, UnauthorizedException,
UnprocessableEntity)
from .forms import ISODateTimeField, RestModelForm, rest_modelform_factory, RestValidationError
from .forms import RestModelForm, rest_modelform_factory, RestValidationError
from .utils import coerce_rest_request_method, set_rest_context_to_request, rfs
from .utils.helpers import str_to_class
from .serializer import (
Expand Down Expand Up @@ -1055,8 +1054,6 @@ def _get_name(self):
return force_text(remove_accent(force_text(self.model._meta.verbose_name_plural)))

def formfield_for_dbfield(self, db_field, **kwargs):
if isinstance(db_field, DateTimeField):
kwargs.update({'form_class': ISODateTimeField})
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not exist in such a base class

return db_field.formfield(**kwargs)

def _get_instance(self, data):
Expand Down