1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +00:00
django/tests/admin_views/views.py

13 lines
333 B
Python
Raw Normal View History

from django.contrib.admin.views.decorators import staff_member_required
from django.http import HttpResponse
@staff_member_required
def secure_view(request):
return HttpResponse('%s' % request.POST)
@staff_member_required(redirect_field_name='myfield')
def secure_view2(request):
return HttpResponse('%s' % request.POST)