From a83e7966d951b80867765884ff910c589cb6c86e Mon Sep 17 00:00:00 2001 From: vimal K Date: Thu, 3 Nov 2022 01:39:34 -0500 Subject: [PATCH] Fix #30: Implement Custom Error Pages Signed-off-by: Vimal K --- pmaweb/settings.py | 4 +++- pmaweb/static/css/style.css | 8 ++++++++ pmaweb/templates/404.html | 12 +++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pmaweb/settings.py b/pmaweb/settings.py index ea5b8e60..66d8972f 100644 --- a/pmaweb/settings.py +++ b/pmaweb/settings.py @@ -44,7 +44,7 @@ SECRET_KEY = 'n$6di6axa*m5)$%yzhl6xhe%^b4t^)6#sbz_b5_7&ga@12(+_h' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ( '127.0.0.1', @@ -172,3 +172,5 @@ GITHUB_USER = 'phpmyadmin-bot' GITHUB_TOKEN = None + +COMPRESS_ENABLED = os.environ.get('COMPRESS_ENABLED', False) diff --git a/pmaweb/static/css/style.css b/pmaweb/static/css/style.css index c9e9f42b..9c98a650 100644 --- a/pmaweb/static/css/style.css +++ b/pmaweb/static/css/style.css @@ -138,6 +138,14 @@ div.subscribe { .sfc-logo { text-align: center; } + +footer { + display: table; + text-align: center; + margin-left: auto; + margin-right: auto; + padding-right:50px; +} footer ul { padding:0; margin:1em; diff --git a/pmaweb/templates/404.html b/pmaweb/templates/404.html index 8398a322..4822cfdd 100644 --- a/pmaweb/templates/404.html +++ b/pmaweb/templates/404.html @@ -3,15 +3,17 @@ {% block content %} -

Page Not Found

+ +

+ + Page Not Found +

-The requested URL was not found on this server. This might have several -causes, but if you found this link on some page, you should notify its author -that it no longer works. Please follow to our main +The requested URL was not found on this server. Please visit our main page to find information you were looking for or use the navigation bar above.

- +

If you want to report the missing page. Please visit Support