GenericRelation doesn't respect changes from the default GenericForeignKey field names in the contenttypes framework
|Reported by:||devinj||Owned by:||charmless|
|Cc:||miracle2k||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||yes|
I have a GenericForeignKey with custom field names ( http://pastebin.ca/1073849 ). I get an error when I use one of the GenericRelations, because it doesn't try to use this custom field name.
FieldError: Cannot resolve keyword 'content_type' into field. Choices are: author, channel, content, creation_time, id, object_id, parent_type, post, replies, title, update_time
Instead, it tries to use the default names. I think that's these lines in this paste: http://pastebin.ca/1074704 . It should be noted that at one point I did use the default names, but never really tested it, and ended up changing their names and deleting the db, recreating the db using syncdb. I am not aware of any other steps I should have taken.
I've tried asking around (in #django on irc.freenode.net) to see if I've missed anything, but nobody else knows, so this is my best guess for an error I can't otherwise explain.
Change History (12)
comment:1 Changed 8 years ago by
|Patch needs improvement:||unset|
comment:3 Changed 8 years ago by
|Component:||Uncategorized → Contrib apps|
|Triage Stage:||Unreviewed → Accepted|
comment:4 Changed 8 years ago by
|Owner:||changed from nobody to charmless|
|Patch needs improvement:||set|
|Status:||new → assigned|