fisk/core/views/demo.py

27 lines
597 B
Python
Raw Normal View History

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