envelope/core/views/demo.py

27 lines
597 B
Python
Raw Normal View History

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