27 lines
597 B
Python
27 lines
597 B
Python
|
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)
|