mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #32124 -- Added per-view opt-out for APPEND_SLASH behavior.
This commit is contained in:
committed by
Carlton Gibson
parent
3418092238
commit
ad11f5b8c9
@@ -1,5 +1,19 @@
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user