diff --git a/schedule/models/calendars.py b/schedule/models/calendars.py index 49d6a897..ad484874 100644 --- a/schedule/models/calendars.py +++ b/schedule/models/calendars.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from django.contrib.contenttypes import generic +from django.contrib.contenttypes import fields from django.db import models from django.db.models import Q from django.contrib.auth.models import User @@ -224,7 +224,7 @@ class CalendarRelation(models.Model): calendar = models.ForeignKey(Calendar, verbose_name=_("calendar")) content_type = models.ForeignKey(ContentType) object_id = models.IntegerField() - content_object = generic.GenericForeignKey('content_type', 'object_id') + content_object = fields.GenericForeignKey('content_type', 'object_id') distinction = models.CharField(_("distinction"), max_length = 20, null=True) inheritable = models.BooleanField(_("inheritable"), default=True) diff --git a/schedule/models/events.py b/schedule/models/events.py index b79e3233..62b33b4a 100644 --- a/schedule/models/events.py +++ b/schedule/models/events.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from django.contrib.contenttypes import generic +from django.contrib.contenttypes import fields from django.db import models from django.db.models import Q from django.contrib.auth.models import User @@ -327,7 +327,7 @@ class EventRelation(models.Model): event = models.ForeignKey(Event, verbose_name=_("event")) content_type = models.ForeignKey(ContentType) object_id = models.IntegerField() - content_object = generic.GenericForeignKey('content_type', 'object_id') + content_object = fields.GenericForeignKey('content_type', 'object_id') distinction = models.CharField(_("distinction"), max_length = 20, null=True) objects = EventRelationManager()