From d2bcef6e3693c726e0c6014934f488efe367a1ad Mon Sep 17 00:00:00 2001 From: Expo laptop Crowley Date: Wed, 5 Jul 2023 18:35:17 +0200 Subject: [PATCH] Turn menu bar magenta if running on localserver --- media/css/trog3.css | 10 ++++++++-- settings.py | 8 +++++++- templates/base.html | 4 ++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/media/css/trog3.css b/media/css/trog3.css index 1311686..0a38d17 100644 --- a/media/css/trog3.css +++ b/media/css/trog3.css @@ -385,7 +385,13 @@ div#editLinks a{ text-align:center; font-weight:bold; } - +.toolbarlinkslocal +{ + padding:5px; + background-color:#f9f; + text-align:center; + font-weight:bold; +} .footer { Dposition:fixed; visibility:none; @@ -664,4 +670,4 @@ a.deletelink:link, a.deletelink:visited { a.deletelink:hover { color: #993333; -} \ No newline at end of file +} diff --git a/settings.py b/settings.py index 938c024..71cce39 100644 --- a/settings.py +++ b/settings.py @@ -1,3 +1,4 @@ +import sys """ Django settings for troggle project. @@ -17,7 +18,12 @@ https://docs.djangoproject.com/en/dev/ref/settings/ print("* importing troggle/settings.py") - +if 'runserver' in sys.argv: + print(">>>>running on dev local runserver<<<<") + DEVSERVER = True +else: + DEVSERVER = False + # default value, then gets overwritten by real secrets SECRET_KEY = "not-the-real-secret-key-a#vaeozn0---^fj!355qki*vj2" diff --git a/templates/base.html b/templates/base.html index b0e90eb..e654edd 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,11 @@ +{% if settings.DEVSERVER %} +
+{% else %}