On Wed, Apr 20, 2011 at 12:45 PM, Daniel Gagnon <redalas...@gmail.com> wrote: > Sure, here's a minimal version of them (I skipped fields that aren't too > relevant to the problem at hand because there's many, including tons of > foreign keys): > class Target(Model): > name = CharField("Target Name", max_length=255, unique=True) > created = DateTimeField(auto_now_add=True, editable=False) > modified = DateTimeField(auto_now=True, editable=False) > class Ticket(Model): > target = ForeignKey(Target, related_name="tickets") > reference = CharField(max_length=255) > created = DateTimeField(auto_now_add=True, editable=False) > modified = DateTimeField(auto_now=True, editable=False)
It probably is related to the this being a foreign key field and in order for it to produce a valid object instance from the Target model, it needs a queryset. Try to subclass from ModelChoiceField[1] and see if that works. [1] http://code.djangoproject.com/browser/django/trunk/django/forms/models.py#L891 -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.