From 5c67a3a707a397c90b1b9de940644f1778edbda0 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 12 Oct 2022 07:22:22 +0100 Subject: [PATCH] Begin implementing settings page --- core/templates/window-content/settings.html | 0 core/views/{demo.py => config.py} | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 core/templates/window-content/settings.html rename core/views/{demo.py => config.py} (68%) diff --git a/core/templates/window-content/settings.html b/core/templates/window-content/settings.html new file mode 100644 index 0000000..e69de29 diff --git a/core/views/demo.py b/core/views/config.py similarity index 68% rename from core/views/demo.py rename to core/views/config.py index 4840682..4b8660d 100644 --- a/core/views/demo.py +++ b/core/views/config.py @@ -2,7 +2,15 @@ import uuid from django.shortcuts import render from django.views import View +from django.http import HttpResponseBadRequest +class OpenSettings(View): + allowed_types = ["modal", "widget", "window"] + + async def get(self, request, type): + if type not in self.allowed_types: + return HttpResponseBadRequest + #template_name = class DemoModal(View): template_name = "modals/modal.html"