2015-01-28 20:35:27 +08:00
|
|
|
from django.core.exceptions import DisallowedHost, SuspiciousOperation
|
2016-04-14 05:38:17 +08:00
|
|
|
from django.http import HttpResponse
|
|
|
|
|
|
|
|
|
|
|
|
def innocent(request):
|
|
|
|
return HttpResponse('innocent')
|
2013-05-16 07:14:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
def suspicious(request):
|
|
|
|
raise SuspiciousOperation('dubious')
|
|
|
|
|
|
|
|
|
|
|
|
def suspicious_spec(request):
|
|
|
|
raise DisallowedHost('dubious')
|