From 7cec923dae006d407ae6187935db51fa55f3fa8c Mon Sep 17 00:00:00 2001 From: Akash Bhave Date: Tue, 13 Oct 2020 21:46:01 -0400 Subject: [PATCH] Create simple base.html and add meta information --- README.md | 3 ++- studyguidebank/apps/home/views.py | 2 +- studyguidebank/templates/base.html | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6d2866..c684e11 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # Study Bank ## Development + - clone the git repo - create `settings/secret.py` based on `settings/secret.sample` - register an OAuth app with Ion for authentication (client-type = confidential, auth-grant-type = authorization-code) - copy the client_id for SOCIAL_AUTH_ION_KEY and client_secret for SOCIAL_AUTH_ION_SECRET from Ion to `settings/secret.py` - edit `settings/__init__.py` so that `MEDIA_ROOT` and `STATIC_ROOT` point to your desired directories (you also need to create these directories) - uploaded documents will be stored in the media directory, and static files will be collected to the static directory -- django will not serve any files in either of these directories, so you need to make sure your web server will \ No newline at end of file +- django will not serve any files in either of these directories, so you need to make sure your web server will diff --git a/studyguidebank/apps/home/views.py b/studyguidebank/apps/home/views.py index 7f0e0df..aa6c376 100644 --- a/studyguidebank/apps/home/views.py +++ b/studyguidebank/apps/home/views.py @@ -4,7 +4,7 @@ from django.http import HttpResponse # Create your views here. def index_view(request): - #return render(request, "home/index.html") + return render(request, "base.html") return HttpResponse("hello world") diff --git a/studyguidebank/templates/base.html b/studyguidebank/templates/base.html index e69de29..07baa0c 100644 --- a/studyguidebank/templates/base.html +++ b/studyguidebank/templates/base.html @@ -0,0 +1,18 @@ + +{% load static %} + + + + + Study Guide Bank + + + + + + {% block head %}{% endblock %} + + + {% block main %}{% endblock %} + + \ No newline at end of file