Allow unsafe async and make more things async

This commit is contained in:
2022-10-12 07:22:22 +01:00
parent 5bf65e3c90
commit 22df27178b
8 changed files with 215 additions and 25 deletions

View File

@@ -7,14 +7,14 @@ from django.views import View
class DemoModal(View):
template_name = "modals/modal.html"
def get(self, request):
async def get(self, request):
return render(request, self.template_name)
class DemoWidget(View):
template_name = "widgets/widget.html"
def get(self, request):
async def get(self, request):
unique = str(uuid.uuid4())[:8]
return render(request, self.template_name, {"unique": unique})
@@ -22,5 +22,5 @@ class DemoWidget(View):
class DemoWindow(View):
template_name = "windows/window.html"
def get(self, request):
async def get(self, request):
return render(request, self.template_name)