mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
15 lines
305 B
Python
15 lines
305 B
Python
from django.core.exceptions import DisallowedHost, SuspiciousOperation
|
|
from django.http import HttpResponse
|
|
|
|
|
|
def innocent(request):
|
|
return HttpResponse('innocent')
|
|
|
|
|
|
def suspicious(request):
|
|
raise SuspiciousOperation('dubious')
|
|
|
|
|
|
def suspicious_spec(request):
|
|
raise DisallowedHost('dubious')
|