From 461436b30c248597bb56f83b6251a4c5bb5930bd Mon Sep 17 00:00:00 2001 From: Nico Picchio Date: Fri, 1 Sep 2023 17:44:47 +0100 Subject: [PATCH] adds stylesheet and minimal changes to admin page --- mysite/db.sqlite3 | Bin 147456 -> 147456 bytes .../__pycache__/settings.cpython-311.pyc | Bin 2627 -> 2654 bytes mysite/mysite/settings.py | 2 +- .../polls/__pycache__/admin.cpython-311.pyc | Bin 372 -> 1248 bytes .../polls/__pycache__/models.cpython-311.pyc | Bin 2056 -> 2285 bytes mysite/polls/admin.py | 21 ++++++++++++++++-- .../0002_question_is_active.cpython-311.pyc | Bin 806 -> 806 bytes mysite/polls/models.py | 6 +++++ mysite/polls/static/polls/style.css | 3 +++ mysite/polls/templates/polls/index.html | 4 ++++ mysite/templates/admin/base_site.html | 12 ++++++++++ 11 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 mysite/polls/static/polls/style.css create mode 100644 mysite/templates/admin/base_site.html diff --git a/mysite/db.sqlite3 b/mysite/db.sqlite3 index 06ee5aab3cf457cf18824afefdfe59e7f38a26bf..1f6e8ba74a62f5519c21261e2b6738e122d64679 100644 GIT binary patch delta 771 zcma))O=uHQ6ouzyGLv~TNp7Vr*x07&Xbob1CV4YSW>88fhzk{p;!d>93^vj>sZCXo zVq*7VaWM#Px^g3xA|>D^E1}edh(Z<8Y)T<2{(`vBg>NQW5Er`ncs$O%mvio|R&lk8 zZ|_56OZ}s0Z1n=0?3TLx>@X^qrl#i37bZ)^g2mstlAJ~SVmn!HCsBVnBte6Lukal{ z!W-CzE!c$T@D!dv6lzP&0{aHcRwWUT`G%Fm2>W zD)xsK8a&t;NtKF0sFJ9fmdpEgmA^;Q>;`%|+LS?5L)8;Gq7g-@$6IJK735%rfpvIA z@8U76&>h}`kjQgPuYeqnyr1KkJ^^(y;_dZ8Pb}=kUXJM&5Dl6a8HV9tr*jjZ;T`PI z9xvdKb2B{el5^>Gu7G7(j03d918WR4VGV9k`68g`Qf+^9n9hw7+zD%*?!H)>`8!|D JZjN{k`~>%@!Xp3x delta 235 zcmZo@;B08%oFL8UGf~Ew(Pv`>lu}R@{bw#|L}k3|HS{6 z{{{bJp!|9M?T_~}Dhdd&@#!+~FXUI`yTdn=FNsfgW1}SBcHMi7*A2Ot_)jqKpWwg2 ze;TM^7ytAV@=Q8X{0s=d1!OYue}|e4RP>x*l8b?bnUj&3nVFN57bwlhe}{qp4u21S T4^X<1pD|!!qtEm^_Dm`O8f8aB diff --git a/mysite/mysite/__pycache__/settings.cpython-311.pyc b/mysite/mysite/__pycache__/settings.cpython-311.pyc index 3c6b4144aceb381ebac30cd2870b4d1b09db5e00..c36ebb4e336b60a31b56953731dfeb69ff6d2833 100644 GIT binary patch delta 209 zcmX>sa!-VJIWI340}zz(e@eMLkyn!O!$kGg`c$?Q&MIyOhIGahmK3gZh7|5ajG2rn zJabsm8KZbpc%%4I_)_?Rssuo)QUvEPWim$brwFA8162v7h=55^Fe#SFn9dR zm?9A+l)@4v48$TSl2M{5Qc+?l(!mUxGKt!Z3=CW@S&4b+`3l9Uo0S=lF*9+NY<|EJ u%E-vG*^F%)6PFs$l|WSt#lDljaddMDO3v`UD5!oxKx1+<=N=XnpbP;0V=|He delta 175 zcmca7a#)0SIWI340}%Z5+nTa>BCjOli;3#38R-luEGe8ol4}uTCSwZs9F}y(DBcvF zD83Zl6uwlp6#go128I-YIZT<1QT!=_DMCP1f+@maQUpwjW-_L;L}C=W Nnmmtl4~sHT1OPvKDO~^n diff --git a/mysite/mysite/settings.py b/mysite/mysite/settings.py index b048ffd..c6c5c73 100644 --- a/mysite/mysite/settings.py +++ b/mysite/mysite/settings.py @@ -55,7 +55,7 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [BASE_DIR / 'templates'], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/mysite/polls/__pycache__/admin.cpython-311.pyc b/mysite/polls/__pycache__/admin.cpython-311.pyc index 2028c90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tvJU!-ZE zRyy-NojcZZQNb0<1mT3M0>c7gs-ZFO0ktdcJz9@09pc%U)#cflxx1nMxJG?354a}6 z$3%E?$qi_QLe$St-SGnIM+bo$BIaKMM};Xczz#Iej2yzW3>ac@JhGG`TSd3xjh8() z0K3!~hBtQ7{}$@-+B4$ RH1eJOA2H0n;Ymdt_7C=X&QbsX delta 712 zcmaDW*df5XoR^o20SH7}KcwhRJ4&va7$7Dqv8QhZ8cNvbAOkpNJ%NE}EMGXV(& zg(AVpo0x6*K*Gf?K%#-+E}z)sf6NZ-!a$y%CeLJ77E@6^Ao~`t3($y=%-mGB%+#Ee zBB{y!EV8OXK$#+GAhD962&AJ(5Ja%S2o4~lxMcEumS|-rRu9Gx4A@DCR<_9pV%P&bS2HRVt3{ry#096ndM2JlGX3ysZOMtkV z97Ph7kF%?ru=?hwq~<^Z3al8_fL|Oox%nxjIjMF + {% if latest_question_list %}
    {% for question in latest_question_list %} diff --git a/mysite/templates/admin/base_site.html b/mysite/templates/admin/base_site.html new file mode 100644 index 0000000..1a08187 --- /dev/null +++ b/mysite/templates/admin/base_site.html @@ -0,0 +1,12 @@ +{% extends "admin/base.html" %} + +{% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %} + +{% block branding %} +

    Polls Administration

    +{% if user.is_anonymous %} + {% include "admin/color_theme_toggle.html" %} +{% endif %} +{% endblock %} + +{% block nav-global %}{% endblock %}