We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2220016 commit 8feebf1Copy full SHA for 8feebf1
categories/fields.py
@@ -7,19 +7,15 @@ class CategoryM2MField(ManyToManyField):
7
"""A many to many field to a Category model."""
8
9
def __init__(self, **kwargs):
10
- from .models import Category
11
-
12
if "to" in kwargs:
13
kwargs.pop("to")
14
- super(CategoryM2MField, self).__init__(to=Category, **kwargs)
+ super(CategoryM2MField, self).__init__(to="categories.Category", **kwargs)
15
16
17
class CategoryFKField(ForeignKey):
18
"""A foreign key to the Category model."""
19
20
21
22
23
24
25
- super(CategoryFKField, self).__init__(to=Category, **kwargs)
+ super(CategoryFKField, self).__init__(to="categories.Category", **kwargs)
0 commit comments