2010-01-11 01:35:01 +08:00
|
|
|
from django import http
|
2010-10-30 15:19:04 +08:00
|
|
|
from django.core.exceptions import PermissionDenied
|
2010-01-11 01:35:01 +08:00
|
|
|
|
2010-10-30 15:19:04 +08:00
|
|
|
def normal_view(request):
|
|
|
|
return http.HttpResponse('OK')
|
|
|
|
|
|
|
|
def not_found(request):
|
|
|
|
raise http.Http404()
|
|
|
|
|
|
|
|
def server_error(request):
|
|
|
|
raise Exception('Error in view')
|
|
|
|
|
|
|
|
def null_view(request):
|
|
|
|
return None
|
|
|
|
|
|
|
|
def permission_denied(request):
|
|
|
|
raise PermissionDenied()
|