django/tests/middleware/views.py

20 lines
493 B
Python
Raw Normal View History

from django.http import HttpResponse
from django.utils.decorators import method_decorator
from django.views.decorators.common import no_append_slash
from django.views.generic import View
def empty_view(request, *args, **kwargs):
return HttpResponse()
@no_append_slash
def sensitive_fbv(request, *args, **kwargs):
return HttpResponse()
@method_decorator(no_append_slash, name='dispatch')
class SensitiveCBV(View):
def get(self, *args, **kwargs):
return HttpResponse()