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"
|
|
|
|
|
2022-10-12 06:22:22 +00:00
|
|
|
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"
|
|
|
|
|
2022-10-12 06:22:22 +00:00
|
|
|
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"
|
|
|
|
|
2022-10-12 06:22:22 +00:00
|
|
|
async def get(self, request):
|
2022-10-12 06:22:22 +00:00
|
|
|
return render(request, self.template_name)
|