0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
django/tests/middleware/views.py
2022-02-07 20:37:05 +01:00

20 lines
493 B
Python

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