From 656536974bda4b70e5dd305063b74eb3e9a975f8 Mon Sep 17 00:00:00 2001 From: Stephan Telling Date: Wed, 8 Mar 2017 00:24:14 +0100 Subject: [PATCH] fix error with CampRelatedModel --- src/info/models.py | 4 ++-- src/program/models.py | 4 ++-- src/utils/models.py | 2 +- src/villages/models.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/info/models.py b/src/info/models.py index 12fb7b58..e166b2d7 100644 --- a/src/info/models.py +++ b/src/info/models.py @@ -3,7 +3,7 @@ from utils.models import CreatedUpdatedModel, CampRelatedModel from django.core.exceptions import ValidationError -class InfoCategory(CreatedUpdatedModel, CampRelatedModel): +class InfoCategory(CampRelatedModel): class Meta: ordering = ['weight', 'headline'] unique_together = (('anchor', 'camp'), ('headline', 'camp')) @@ -38,7 +38,7 @@ class InfoCategory(CreatedUpdatedModel, CampRelatedModel): return '%s (%s)' % (self.headline, self.camp) -class InfoItem(CreatedUpdatedModel, CampRelatedModel): +class InfoItem(CampRelatedModel): class Meta: ordering = ['weight', 'headline'] unique_together = (('anchor', 'category'), ('headline', 'category')) diff --git a/src/program/models.py b/src/program/models.py index 8f5131b9..705ec486 100644 --- a/src/program/models.py +++ b/src/program/models.py @@ -39,7 +39,7 @@ class UserSubmittedModel(CampRelatedModel): ) -class EventLocation(CreatedUpdatedModel, CampRelatedModel): +class EventLocation(CampRelatedModel): """ The places where stuff happens """ name = models.CharField(max_length=100) slug = models.SlugField() @@ -106,7 +106,7 @@ class Event(UserSubmittedModel): return reverse_lazy('event_detail', kwargs={'camp_slug': self.camp.slug, 'slug': self.slug}) -class EventInstance(CreatedUpdatedModel, CampRelatedModel): +class EventInstance(CampRelatedModel): """ An instance of an event """ event = models.ForeignKey('program.event', related_name='instances') when = DateTimeRangeField() diff --git a/src/utils/models.py b/src/utils/models.py index a79e08cc..7a73bd86 100644 --- a/src/utils/models.py +++ b/src/utils/models.py @@ -47,7 +47,7 @@ class CreatedUpdatedModel(CleanedModel): updated = models.DateTimeField(auto_now=True) -class CampRelatedModel(CleanedModel): +class CampRelatedModel(CreatedUpdatedModel): class Meta: abstract = True diff --git a/src/villages/models.py b/src/villages/models.py index fb8a9fed..dbd1856e 100644 --- a/src/villages/models.py +++ b/src/villages/models.py @@ -5,7 +5,7 @@ from utils.models import CreatedUpdatedModel, UUIDModel, CampRelatedModel from .managers import VillageQuerySet -class Village(CreatedUpdatedModel, UUIDModel, CampRelatedModel): +class Village(UUIDModel, CampRelatedModel): class Meta: ordering = ['name']