mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
newforms-admin: Added staff_member_required and never_cache decorators to model_admin_view()
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4317 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7859dee662
commit
b3cce4326b
@ -111,6 +111,7 @@ def model_admin_view(request, app_label, model_name, rest_of_url):
|
|||||||
raise Http404("App %r, model %r, not found" % (app_label, model_name))
|
raise Http404("App %r, model %r, not found" % (app_label, model_name))
|
||||||
mav = ModelAdminView(model._meta)
|
mav = ModelAdminView(model._meta)
|
||||||
return mav(request, rest_of_url)
|
return mav(request, rest_of_url)
|
||||||
|
model_admin_view = staff_member_required(never_cache(model_admin_view))
|
||||||
|
|
||||||
class ModelAdminView(object):
|
class ModelAdminView(object):
|
||||||
"Class that encapsulates all admin views for a given model."
|
"Class that encapsulates all admin views for a given model."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user