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