From 30bf4f5747f4e23d10a3d51feb57f248cdbcce08 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 22 Nov 2020 13:13:19 +0100 Subject: [PATCH] core: migrate shell to core, remove navbar --- passbook/admin/urls.py | 2 - passbook/admin/views/shell.py | 8 ---- passbook/core/templates/base/page.html | 48 +------------------ .../templates}/shell.html | 9 ++-- passbook/core/urls.py | 5 +- passbook/core/views/shell.py | 8 ++++ 6 files changed, 15 insertions(+), 65 deletions(-) delete mode 100644 passbook/admin/views/shell.py rename passbook/{admin/templates/administration => core/templates}/shell.html (64%) create mode 100644 passbook/core/views/shell.py diff --git a/passbook/admin/urls.py b/passbook/admin/urls.py index 798dbe3f7..5c556d304 100644 --- a/passbook/admin/urls.py +++ b/passbook/admin/urls.py @@ -13,7 +13,6 @@ from passbook.admin.views import ( policies_bindings, property_mappings, providers, - shell, sources, stages, stages_bindings, @@ -25,7 +24,6 @@ from passbook.admin.views import ( ) urlpatterns = [ - path("", shell.ShellView.as_view(), name="shell"), path( "overview/cache/flow/", overview.FlowCacheClearView.as_view(), diff --git a/passbook/admin/views/shell.py b/passbook/admin/views/shell.py deleted file mode 100644 index 19499452a..000000000 --- a/passbook/admin/views/shell.py +++ /dev/null @@ -1,8 +0,0 @@ -"""admin shell view""" -from django.views.generic.base import TemplateView - - -class ShellView(TemplateView): - """admin shell view""" - - template_name = "administration/shell.html" diff --git a/passbook/core/templates/base/page.html b/passbook/core/templates/base/page.html index a9ff863fe..0b5950c95 100644 --- a/passbook/core/templates/base/page.html +++ b/passbook/core/templates/base/page.html @@ -8,54 +8,8 @@ {% block body %} -
+ diff --git a/passbook/admin/templates/administration/shell.html b/passbook/core/templates/shell.html similarity index 64% rename from passbook/admin/templates/administration/shell.html rename to passbook/core/templates/shell.html index 277df62db..adabb7263 100644 --- a/passbook/admin/templates/administration/shell.html +++ b/passbook/core/templates/shell.html @@ -13,11 +13,8 @@ {% endblock %} {% block page_content %} - - - + + + - {% endblock %} diff --git a/passbook/core/urls.py b/passbook/core/urls.py index 04732c66c..c46027c91 100644 --- a/passbook/core/urls.py +++ b/passbook/core/urls.py @@ -1,7 +1,7 @@ """passbook URL Configuration""" from django.urls import path -from passbook.core.views import impersonate, overview, user +from passbook.core.views import impersonate, overview, user, shell urlpatterns = [ # User views @@ -23,7 +23,8 @@ urlpatterns = [ name="user-tokens-delete", ), # Overview - path("", overview.OverviewView.as_view(), name="overview"), + path("", shell.ShellView.as_view(), name="shell"), + path("-/overview/", overview.OverviewView.as_view(), name="overview"), # Impersonation path( "-/impersonation//", diff --git a/passbook/core/views/shell.py b/passbook/core/views/shell.py new file mode 100644 index 000000000..d401f3c66 --- /dev/null +++ b/passbook/core/views/shell.py @@ -0,0 +1,8 @@ +"""core shell view""" +from django.views.generic.base import TemplateView + + +class ShellView(TemplateView): + """core shell view""" + + template_name = "shell.html"