Skip to content

Commit

Permalink
Reconfigure events.py for django 1.9
Browse files Browse the repository at this point in the history
Change django.contrib.contenttypes import from generic to fields
  • Loading branch information
kiiluchris committed Apr 11, 2016
1 parent e08d198 commit fb2c838
Showing 1 changed file with 2 additions and 2 deletions.
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 fb2c838

Please sign in to comment.