File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,15 @@ class CategoryM2MField(ManyToManyField):
7
7
"""A many to many field to a Category model."""
8
8
9
9
def __init__ (self , ** kwargs ):
10
- from .models import Category
11
-
12
10
if "to" in kwargs :
13
11
kwargs .pop ("to" )
14
- super (CategoryM2MField , self ).__init__ (to = Category , ** kwargs )
12
+ super (CategoryM2MField , self ).__init__ (to = "categories. Category" , ** kwargs )
15
13
16
14
17
15
class CategoryFKField (ForeignKey ):
18
16
"""A foreign key to the Category model."""
19
17
20
18
def __init__ (self , ** kwargs ):
21
- from .models import Category
22
-
23
19
if "to" in kwargs :
24
20
kwargs .pop ("to" )
25
- super (CategoryFKField , self ).__init__ (to = Category , ** kwargs )
21
+ super (CategoryFKField , self ).__init__ (to = "categories. Category" , ** kwargs )
You can’t perform that action at this time.
0 commit comments