2008-08-09 17:35:19 +00:00
|
|
|
from django.contrib.admin.views.decorators import staff_member_required
|
|
|
|
from django.http import HttpResponse
|
|
|
|
|
2013-11-03 04:36:09 +00:00
|
|
|
|
2011-05-01 16:46:02 +00:00
|
|
|
@staff_member_required
|
2008-08-09 17:35:19 +00:00
|
|
|
def secure_view(request):
|
2020-05-01 14:54:15 +00:00
|
|
|
return HttpResponse(str(request.POST))
|
2015-02-06 21:45:46 +00:00
|
|
|
|
|
|
|
|
2022-02-03 19:24:19 +00:00
|
|
|
@staff_member_required(redirect_field_name="myfield")
|
2015-02-06 21:45:46 +00:00
|
|
|
def secure_view2(request):
|
2020-05-01 14:54:15 +00:00
|
|
|
return HttpResponse(str(request.POST))
|