Skip to content

Commit

Permalink
Merge pull request thauber#55 from CKiilu/master
Browse files Browse the repository at this point in the history
Update contenttypes from generic to fields
  • Loading branch information
bartekgorny committed Apr 16, 2016
2 parents 328d1db + fb2c838 commit 0bd4bb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions schedule/models/calendars.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions schedule/models/events.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0bd4bb3

Please sign in to comment.