Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit 50e4d09

Browse files
Fix 09 (#28)
* Admin UI * Footer Text Changed * Background Colour Changed
1 parent 35d39d6 commit 50e4d09

File tree

5 files changed

+93
-5
lines changed

5 files changed

+93
-5
lines changed

questions/admin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
from django.contrib import admin
22
from .models import *
33

4-
admin.site.register(Topic)
5-
admin.site.register(Type)
4+
5+
class SnippetAdmin(admin.ModelAdmin):
6+
change_list_template = 'admin/questions/login.html'
7+
8+
9+
admin.site.register(Topic, SnippetAdmin)
10+
admin.site.register(Type, SnippetAdmin)
61.9 KB
Loading
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{% extends "admin/login.html" %}
2+
{% load i18n static %}
3+
4+
{% load static %}
5+
6+
{% block footer %}
7+
<style>
8+
#footer {
9+
text-align: center;
10+
padding: 2rem;
11+
background: #eee;
12+
font-family: monospace;
13+
font-weight: 400;
14+
font-size: 1rem;
15+
/* color: #333; */
16+
}
17+
</style>
18+
<div id="footer">
19+
Qujini Question Paper Generator
20+
</div>
21+
{% endblock %}
22+
{% block script %}
23+
24+
25+
<script src="{% static 'questions/js/login-extra.js' %}"></script>
26+
{% endblock %}
27+
28+
29+
<!-- //new start -->
30+
{% block branding %}
31+
<style>
32+
body.login {
33+
/* background: #ffc107; */
34+
min-height: 100vh;
35+
align-items: center;
36+
justify-content: center;
37+
display: flex;
38+
}
39+
40+
.login #header {
41+
height: auto;
42+
padding: 1rem;
43+
/* background: #222; */
44+
}
45+
46+
.login #branding {
47+
width: 100%;
48+
}
49+
50+
.login .head {
51+
display: flex;
52+
align-items: center;
53+
justify-content: center;
54+
}
55+
56+
.login #container {
57+
/* background: #fff; */
58+
border: none;
59+
border-radius: 4px;
60+
box-shadow: 2px 3px 5px #333;
61+
overflow: hidden;
62+
width: 50vw;
63+
margin: 0;
64+
max-width: 400px;
65+
}
66+
67+
.login .submit-row {
68+
display: flex;
69+
justify-content: center;
70+
padding: 2.5rem 0;
71+
}
72+
73+
.login .submit-row input {
74+
/* background: #ffc107; */
75+
/* color: black; */
76+
display: block;
77+
width: 100%;
78+
}
79+
</style>
80+
81+
<div class="head">
82+
<img class="brand_img" src="{% static 'questions/logo_light.png' %}" style="height: 5rem;" alt="logo">
83+
</div>
84+
{% endblock %}

qujini/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
# Application definition
3232

3333
INSTALLED_APPS = [
34+
'questions',
3435
'django.contrib.admin',
3536
'django.contrib.auth',
3637
'django.contrib.contenttypes',
3738
'django.contrib.sessions',
3839
'django.contrib.messages',
3940
'django.contrib.staticfiles',
40-
'questions',
4141
'ckeditor',
4242
]
4343

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Django==2.2.1
22
django-ckeditor==5.7.1
33
pytz==2019.1
4-
sqlparse==0.3.0
5-
4+
sqlparse==0.3.0

0 commit comments

Comments
 (0)