#3987: ModelAdmin should allow for overriding of ForeignKey/ManyToMany options
-----------------------------------------------------------+----------------
Reporter: Baptiste <[EMAIL PROTECTED]> | Owner: nobody
Status: reopened | Milestone:
Component: Admin interface | Version:
newforms-admin
Resolution: | Keywords:
nfa-someday
Stage: Someday/Maybe | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-----------------------------------------------------------+----------------
Comment (by anonymous):
I'ld like to show in model A list_filter model B fields that have a
ForeignKey to model A.
I've applied dynamic_related_3987.2.diff to django svn trunk.
I've add a method get_b() to the A admin class ("class
AAdmin(admin.ModelAdmin):") that returns a.b_set.all(), but I don't know
how I've to include it in list_filter. I've put "list_filter =
(...,'get_b')" but get the error:
{{{
Error while importing URLconf 'myapp.urls': `AAdmin.list_filter[9]` refers
to field `get_b` that is missing from model `A`.
}}}
What should be solve the error?
Thanks in advance.
--
Ticket URL: <http://code.djangoproject.com/ticket/3987#comment:29>
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
-~----------~----~----~----~------~----~------~--~---