Generic foreign keys and the sqlite3 memory database (for unit testing) have recently stopped working for me. I upgraded my sqlite3 version and Django, so am not sure what change caused the problem.
Following is a simple models file that demonstrates the problem. I have no problem when using sqlite with a file-based database. Versions of software I'm running: Django: Today's trunk sqlite3: 3.3.7_0+darwin_8 pysqlite: 2.3.2 Model file: ----------------------------------------------- from django.db import models from django.contrib.contenttypes.models import ContentType def test_all(): """ >>> msg = Message(title="hi") >>> msg.save() >>> msg <Message: Message object> >>> tag = msg.tags.create(tag="sometag") >>> tag <Tag: Tag object> >>> assert tag.content_object is not None """ class Tag(models.Model): tag = models.SlugField() content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = models.GenericForeignKey() class Message(models.Model): title = models.CharField(maxlength=100) tags = models.GenericRelation(Tag) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---