blob: 3a478afb9475531ae775ea8c74fa98b9e5580ee2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
from django.http import HttpResponse
from django.urls import path
from django.views import View
class EmptyCBV(View):
pass
class EmptyCallableView:
def __call__(self, request, *args, **kwargs):
return HttpResponse()
urlpatterns = [
path("missing_as_view", EmptyCBV),
path("has_as_view", EmptyCBV.as_view()),
path("callable_class", EmptyCallableView()),
]
|