According to
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Genericrelations
havemoved
GenericForeignKey has been moved to into the django.contrib.contenttypes
module ...
Which means that this patch is need for the latest trunk version (May 2007):
===================================================================
--- voting/models.py (revision 41)
+++ voting/models.py (working copy)
@@ -1,4 +1,5 @@
from django.db import backend, connection, models
+from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import User
@@ -138,7 +139,7 @@
user = models.ForeignKey(User)
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
- object = models.GenericForeignKey('content_type', 'object_id')
+ object = generic.GenericForeignKey('content_type', 'object_id')
vote = models.SmallIntegerField(choices=SCORES)
objects = VoteManager()
Beste regards
Alex
Original issue reported on code.google.com by Alexande...@gmail.com on 16 May 2007 at 9:22
Original issue reported on code.google.com by
Alexande...@gmail.com
on 16 May 2007 at 9:22