Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed circular import

  • Loading branch information...
commit d1a7a7c9771892194f37d61dc7f0a2be23227c26 1 parent e9e800e
@dhatch authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 tastypie/fields.py
View
4 tastypie/fields.py
@@ -7,7 +7,6 @@
from tastypie.bundle import Bundle
from tastypie.exceptions import ApiFieldError, NotFound
from tastypie.utils import dict_strip_unicode_keys
-from tastypie.resources import ModelResource
class NOT_PROVIDED:
pass
@@ -493,6 +492,9 @@ def to_class(self):
if not isinstance(self.to, basestring):
if isinstance(self.to, dict):
# we're expected to return a functioning resource class
+ # import is here because at top it creates a circular import to
+ # resources
+ from tastypie.resources import ModelResource
self._to_class = ModelResource
else:
self._to_class = self.to
Please sign in to comment.
Something went wrong with that request. Please try again.