1
0
mirror of https://github.com/django/django.git synced 2024-12-28 12:06:22 +00:00
django/tests/check_framework/urls/cbv_as_view.py
2022-02-07 20:37:05 +01:00

20 lines
389 B
Python

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