diff options
Diffstat (limited to 'chimere/main/models.py')
-rw-r--r-- | chimere/main/models.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/chimere/main/models.py b/chimere/main/models.py index 3efc1bc..f8f4c80 100644 --- a/chimere/main/models.py +++ b/chimere/main/models.py @@ -27,8 +27,7 @@ from django.contrib.gis.gdal import SpatialReference from django.contrib import admin from chimere import settings -from chimere.main.widgets import PointField, RouteField, \ - ManyToManyField_NoSyncdb +from chimere.main.widgets import PointField, RouteField class News(models.Model): """News of the site @@ -163,8 +162,8 @@ class SubCategory(models.Model): if area_name: area = Area.objects.get(urn=area_name) # if there some restrictions with categories limit them - if area.subcategories.count(): - sub_ids = [sub.id for sub in area.subcategories.all()] + if area.subcategory_set.count(): + sub_ids = [sub.id for sub in area.subcategory_set.all()] # if no area is defined for a category don't filter it sub_ids += [sub.id for sub in subcategories if not sub.areas.count()] @@ -391,9 +390,6 @@ class Area(models.Model, SimpleArea): name = models.CharField(_("Name"), max_length=150) urn = models.SlugField(_("Area urn"), max_length=50, blank=True, unique=True) - subcategories = ManyToManyField_NoSyncdb(SubCategory, - related_name='subcategories', blank=True, null=True, - db_table=u'subcategory_areas') order = models.IntegerField(_("Order")) available = models.BooleanField(_("Available")) upper_left_corner = models.PointField(_("Upper left corner"), |