1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59: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:
Adrian Holovaty 2007-01-14 20:04:56 +00:00
parent 7859dee662
commit b3cce4326b

View File

@ -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))
mav = ModelAdminView(model._meta)
return mav(request, rest_of_url)
model_admin_view = staff_member_required(never_cache(model_admin_view))
class ModelAdminView(object):
"Class that encapsulates all admin views for a given model."