1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
django/tests/logging_tests/views.py

15 lines
305 B
Python
Raw Normal View History

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')