Opened 6 years ago
Closed 6 years ago
#30430 closed New feature (wontfix)
Make the admin URL wrap() decorator accessible from anywhere.
Reported by: | Aidas Bendoraitis | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the get_urls()
of ModelAdmin
, there is a wrap()
decorator defined. It checks permissions, manages caching, and deals with the CSRF protection.
I would find it useful to make the wrap()
decorator accessible from an outer scope, because so when extending the get_urls()
you could apply the decorator to new views without redefining it.
Change History (1)
comment:1 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | Make the admin URL wrap decorator accessible from anywhere → Make the admin URL wrap() decorator accessible from anywhere. |
Version: | 2.2 → master |
Note:
See TracTickets
for help on using tickets.
Thanks, for the report, however I don't see much value in adding
wrap()
hook to theModelAdmin.get_urls()
, you can always useself.admin_site.admin_view()
what is described in documentation.