#4667: [newforms-admin] add edit_inline support for generic relations
-------------------------------------------------------------+--------------
Reporter: Honza Král <[EMAIL PROTECTED]> |
Owner: Honza_Kral
Status: new |
Component: Admin interface
Version: newforms-admin |
Resolution:
Keywords: edit_inline generic content_type sprintsept14 |
Stage: Unreviewed
Has_patch: 1 |
Needs_docs: 0
Needs_tests: 0 |
Needs_better_patch: 1
-------------------------------------------------------------+--------------
Comment (by Honza_Kral):
Replying to [comment:5 jkocherhans]:
> So first of all, the {{{name='object_id:content_type'}}} syntax is just
too dirty. It seems like we should be able to provide *just* the name of
the {{{GenericForeignKey}}} field, then use its {{{ct_field}}} and
{{{fk_field}}} attributes to get what we need. If that isn't possible, I'd
much rather use 2 different arguments, something like {{{ct_field}}} and
{{{fk_field}}}.
I dont want that because I often don't have {{{GenericForeignKey}}}
defined - it is a modular system and I do not want to modify every model
that can use the generic relation. so for that I would have to override
the {{{ InlineModelAdmin }}} as well to provide two options -
{{{ct_name}}} and {{{id_name}}}, but that's certainly an option...
> Also, I *think* we could use the existing {{{FormSet.add_fields}}} hook
instead of adding a new {{{add_fk}}} method like in the patch.
The reason for this is that the patch existed before that hooks were
added, I just did a small update to match the current version... I will
have a look at that
> Keep in mind that I may be missing something here. These are my initial
impressions, but they may not end up working in practice. I haven't worked
all the way through it.
--
Ticket URL: <http://code.djangoproject.com/ticket/4667#comment:7>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---