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:
10
website/home/views.py
Normal file
10
website/home/views.py
Normal 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)
|
Reference in New Issue
Block a user