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.

This commit is contained in:
Yamozha
2021-02-07 04:37:11 +02:00
parent bbf3a75add
commit 9bc05bc6bf
15 changed files with 123 additions and 0 deletions

10
website/home/views.py Normal file
View File

@ -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)