From 9bc05bc6bfc45992340df6cf664778cbfd0819f1 Mon Sep 17 00:00:00 2001 From: Yamozha Date: Sun, 7 Feb 2021 04:37:11 +0200 Subject: [PATCH] Finally realised how static files are served. Made a new branch because of replanning of the workflow. Old progress can be seen at branch django_old. I will also be removing the flask branch shortly. --- website/home/__init__.py | 0 .../home/__pycache__/__init__.cpython-36.pyc | Bin 0 -> 154 bytes website/home/__pycache__/admin.cpython-36.pyc | Bin 0 -> 195 bytes .../home/__pycache__/models.cpython-36.pyc | Bin 0 -> 192 bytes website/home/__pycache__/views.cpython-36.pyc | Bin 0 -> 487 bytes website/home/admin.py | 3 + website/home/apps.py | 5 ++ website/home/migrations/__init__.py | 0 .../__pycache__/__init__.cpython-36.pyc | Bin 0 -> 165 bytes website/home/models.py | 3 + website/home/static/css/style.css | 68 ++++++++++++++++++ website/home/templates/home.html | 23 ++++++ website/home/templates/underline.svg | 8 +++ website/home/tests.py | 3 + website/home/views.py | 10 +++ 15 files changed, 123 insertions(+) create mode 100644 website/home/__init__.py create mode 100644 website/home/__pycache__/__init__.cpython-36.pyc create mode 100644 website/home/__pycache__/admin.cpython-36.pyc create mode 100644 website/home/__pycache__/models.cpython-36.pyc create mode 100644 website/home/__pycache__/views.cpython-36.pyc create mode 100644 website/home/admin.py create mode 100644 website/home/apps.py create mode 100644 website/home/migrations/__init__.py create mode 100644 website/home/migrations/__pycache__/__init__.cpython-36.pyc create mode 100644 website/home/models.py create mode 100644 website/home/static/css/style.css create mode 100644 website/home/templates/home.html create mode 100644 website/home/templates/underline.svg create mode 100644 website/home/tests.py create mode 100644 website/home/views.py diff --git a/website/home/__init__.py b/website/home/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/website/home/__pycache__/__init__.cpython-36.pyc b/website/home/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d4284a65b71ee82ae7933e5c65a086a8b96153a GIT binary patch literal 154 zcmXr!<>lIDDWAXq1dl-k3@`#24nSPY0whuxf*CX!{Z=v*frJsnFL(Xi)RfFb{p`fN z%)CT>$CBLq;DU_QqE!8WqWrAX literal 0 HcmV?d00001 diff --git a/website/home/__pycache__/admin.cpython-36.pyc b/website/home/__pycache__/admin.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6461b57697cbea3e1cde9b4173823c588e9e7635 GIT binary patch literal 195 zcmXr!<>lIDDW71^z`*brh~a<<$Z`PUVgVqL!jQt4!;s4u#mLBz!W7J)$@~&1%Am=3 zi#0JNH#5&qlPQWXB`Yy6Jzp<5Kd+=HGpPtj>SrhBW#%R7 zJC@|;2Nz_d7NzP36y;~7CYKcJJC_y}rRF7924|L}>X)Y`6@%!E{M=N1ur+!GmA5!- Sa`RJ4b5iXXfd&@?F#`Y*m@;Aj literal 0 HcmV?d00001 diff --git a/website/home/__pycache__/models.cpython-36.pyc b/website/home/__pycache__/models.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..19af369f7d4f57b6ea77bfac2dae6adb79f96783 GIT binary patch literal 192 zcmXr!<>lIDDW71;z`*brh~a<<$Z`PUVgVqL!jQt4!;s4u#mLBz!W7J)$@~&1%Am=3 zi!C=lB{iqmPm}2uXG&ILUV6S>N>UL>^Gb#y79a&Ce!1%Brlw>j>SrhBW#%R7JC@|; z2Nz_d7NzP36y;~7CYKcJJC_y}rRF7924|L}>X)Y`6@%!E{M=N1h!uJTmA5!-fb7zo NR69nX$;Cj-004|wF{S_j literal 0 HcmV?d00001 diff --git a/website/home/__pycache__/views.cpython-36.pyc b/website/home/__pycache__/views.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0263aa8b8fc54b6ea58d84aad16516b84026ad2 GIT binary patch literal 487 zcmYjOJ#XAF3>9VH*(q{Orgm&sFBZ^d41xs790a&bUaqRe#CC1#BJr9J+)bB1)4!y( zQ~pAxP=^)>0X~r;_4o*VpUpm~i!VQpK#0HMok@;Q+5J}rBMkInfC?bSvX@n25|ciQ zDm8L0ipdLii2}mZ;b_oZ*37rFgfV45XZPP2NDy?gODNrffzQmgl^a+?H`$5}m}Ctt zY$Q$B!lY}tO(Of{)1fL$Rj(Y=*N-JVPyiQZ|1YjB>HcZ2u>+P34SkV?)Gl!h()y4t zH8mkKtsC`#Azv(R+8!5+kUP|-Z%1@-*&+#&>!JuoWEYE0Zpsb zFFm%SR%bNW`LaQW>dM&;Yx3&+pTK!bsP6Hnk7rb+ez$n<%jILpV|t};G0yNggMd$v z%Urqxj*CfkXgWRK+R``HQN1F+lUHSy-}5GJ%5A&eove58kqaR|9;{jQcoILr$07U7 F{sv+lIDDWAXq1dl-k3@`#24nSPY0whuxf*CX!{Z=v*frJsnuOR*0)RfFb{p`fN z%)CT>$CBLq;DU_QqE!8WqWrAX strong { + font-weight: 400; + + &::after { + // Specific positioning for smaller text + bottom: -0.2rem; + height: 0.5rem; + left: -0.25rem; + right: -0.25rem; + } +} + + diff --git a/website/home/templates/home.html b/website/home/templates/home.html new file mode 100644 index 00000000..24feec72 --- /dev/null +++ b/website/home/templates/home.html @@ -0,0 +1,23 @@ + + + + + {% load static %} + + + Home + + + + + + + + {% block content %} + {% endblock %} +{% csrf_token %} + +

Test!

+

{{ currencyTotal }}

+ + diff --git a/website/home/templates/underline.svg b/website/home/templates/underline.svg new file mode 100644 index 00000000..7bbe7581 --- /dev/null +++ b/website/home/templates/underline.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/website/home/tests.py b/website/home/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/website/home/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/website/home/views.py b/website/home/views.py new file mode 100644 index 00000000..0558d1d8 --- /dev/null +++ b/website/home/views.py @@ -0,0 +1,10 @@ +from django.shortcuts import render +import os.path + +def homePage(request): + currencyTotal = open(os.path.dirname(__file__) + "/../currency.txt","r") + currencyTotal = currencyTotal.readline() + context = { + "currencyTotal" : currencyTotal + } + return render(request, "home.html", context)