#16180: IGNORED_PARAMS customization -------------------------+------------------------------- Reporter: msaelices | Owner: nobody Type: New feature | Status: new Milestone: | Component: contrib.admin Version: SVN | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------+------------------------------- Several times you "hack" the admin interface and want to use extra GET parameters.
Look at this example: {{{ #!python class FooModelAdmin(admin.ModelAdmin): # ... def get_list_display(self, request, extra_context=None): if request.GET.has_key('hide_columns'): return ('pk', ) return super(FooModelAdmin, self).get_list_display(request, extra_context) }}} But this is impossible because the "hide_columns" GET parameter is not allowed by security reasons. The allowed parameters ({{{IGNORED_PARAMS}}} global variable) is hardcoded (look at [source:django/trunk/django/contrib/admin/views/main.py#L29 this code]). Should be good if you should configure this parameters. I don't know if a new setting should be good or maybe a {{{ChangeList.get_ignored_lookup_params()}}} method to do something like that: {{{ #!python class FooChangeList(ChangeList): def get_ignored_lookup_params(self): return super(FooChangeList, self).get_ignored_lookup_params() + ['hide_columns'] }}} Of course you can extends the {{{ChangeList}}} and override the {{{ChangeList.get_lookup_params()}}} method but should be better of using a special method for this useful thing. -- Ticket URL: <https://code.djangoproject.com/ticket/16180> Django <https://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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.