Debian Codegraph @

tests/check_framework/urls/cbv_as_view.py

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