2008-08-10 01:35:19 +08:00
|
|
|
from django.contrib.admin.views.decorators import staff_member_required
|
|
|
|
from django.http import HttpResponse
|
|
|
|
|
2013-11-03 12:36:09 +08:00
|
|
|
|
2011-05-02 00:46:02 +08:00
|
|
|
@staff_member_required
|
2008-08-10 01:35:19 +08:00
|
|
|
def secure_view(request):
|
2020-05-01 22:54:15 +08:00
|
|
|
return HttpResponse(str(request.POST))
|
2015-02-07 05:45:46 +08:00
|
|
|
|
|
|
|
|
|
|
|
@staff_member_required(redirect_field_name='myfield')
|
|
|
|
def secure_view2(request):
|
2020-05-01 22:54:15 +08:00
|
|
|
return HttpResponse(str(request.POST))
|