Reformat code
This commit is contained in:
parent
5b2b77efd3
commit
24527147b3
@ -44,5 +44,4 @@ urlpatterns = [
|
|||||||
path("demo/modal/", demo.DemoModal.as_view(), name="modal"),
|
path("demo/modal/", demo.DemoModal.as_view(), name="modal"),
|
||||||
path("demo/widget/", demo.DemoWidget.as_view(), name="widget"),
|
path("demo/widget/", demo.DemoWidget.as_view(), name="widget"),
|
||||||
path("demo/window/", demo.DemoWindow.as_view(), name="window"),
|
path("demo/window/", demo.DemoWindow.as_view(), name="window"),
|
||||||
|
|
||||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
import uuid
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.views import View
|
from django.views import View
|
||||||
import uuid
|
|
||||||
|
|
||||||
class DemoModal(View):
|
class DemoModal(View):
|
||||||
template_name = "modals/modal.html"
|
template_name = "modals/modal.html"
|
||||||
@ -8,6 +10,7 @@ class DemoModal(View):
|
|||||||
def get(self, request):
|
def get(self, request):
|
||||||
return render(request, self.template_name)
|
return render(request, self.template_name)
|
||||||
|
|
||||||
|
|
||||||
class DemoWidget(View):
|
class DemoWidget(View):
|
||||||
template_name = "widgets/widget.html"
|
template_name = "widgets/widget.html"
|
||||||
|
|
||||||
@ -15,6 +18,7 @@ class DemoWidget(View):
|
|||||||
unique = str(uuid.uuid4())[:8]
|
unique = str(uuid.uuid4())[:8]
|
||||||
return render(request, self.template_name, {"unique": unique})
|
return render(request, self.template_name, {"unique": unique})
|
||||||
|
|
||||||
|
|
||||||
class DemoWindow(View):
|
class DemoWindow(View):
|
||||||
template_name = "windows/window.html"
|
template_name = "windows/window.html"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user