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-02 23:36:09 -05: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 15:54:15 +01:00
|
|
|
return HttpResponse(str(request.POST))
|
2015-02-06 16:45:46 -05:00
|
|
|
|
|
|
|
|
2022-02-03 20:24:19 +01:00
|
|
|
@staff_member_required(redirect_field_name="myfield")
|
2015-02-06 16:45:46 -05:00
|
|
|
def secure_view2(request):
|
2020-05-01 15:54:15 +01:00
|
|
|
return HttpResponse(str(request.POST))
|