mirror of
https://github.com/django/django.git
synced 2024-12-23 09:36:06 +00:00
17 lines
346 B
Python
17 lines
346 B
Python
from __future__ import unicode_literals
|
|
|
|
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')
|