From e25422dbc9d863b95a90f7aa201fd0d5a362c0a8 Mon Sep 17 00:00:00 2001 From: harshithpabbati Date: Wed, 4 Sep 2019 20:30:09 +0530 Subject: [PATCH] templates: Add admin templates --- qujini/settings.py | 2 +- templates/admin/base.html | 38 +++++++ templates/admin/base_site.html | 106 ++++++++++++++++++ .../templates => templates}/admin/login.html | 4 +- 4 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 templates/admin/base.html create mode 100644 templates/admin/base_site.html rename {questions/templates => templates}/admin/login.html (87%) diff --git a/qujini/settings.py b/qujini/settings.py index 76c9c5a..63504fd 100644 --- a/qujini/settings.py +++ b/qujini/settings.py @@ -56,7 +56,7 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [os.path.join(BASE_DIR, 'templates'),os.path.join(BASE_DIR, 'static')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/templates/admin/base.html b/templates/admin/base.html new file mode 100644 index 0000000..2035df2 --- /dev/null +++ b/templates/admin/base.html @@ -0,0 +1,38 @@ +{% extends 'admin/base.html' %} +{% load i18n %} + {% block usertools %} + {% if has_permission %} +
+
+ {% block welcome-msg %} +
+ {% trans 'Welcome ' %} + @{% firstof user.get_short_name user.get_username %} ! +
+ {% endblock %} + {% block userlinks %} + {% trans 'Documentation' %} / + {% if user.has_usable_password %} + {% trans 'Change password' %} / + {% endif %} + {% trans 'Log out' %} + {% endblock %} +
+
+ {% endif %} + {% endblock %} + +{% block footer %} + + +{% endblock %} diff --git a/templates/admin/base_site.html b/templates/admin/base_site.html new file mode 100644 index 0000000..b971f13 --- /dev/null +++ b/templates/admin/base_site.html @@ -0,0 +1,106 @@ +{% extends 'admin/base_site.html' %} +{% load staticfiles %} +{% load static %} + +{% block branding %} + +
+

Qujini

+
+{% endblock %} diff --git a/questions/templates/admin/login.html b/templates/admin/login.html similarity index 87% rename from questions/templates/admin/login.html rename to templates/admin/login.html index f789e3a..60f5f8b 100644 --- a/questions/templates/admin/login.html +++ b/templates/admin/login.html @@ -12,7 +12,6 @@ font-family: monospace; font-weight: 400; font-size: 1rem; - /* color: #333; */ }