From b98e566063b55d06e7ecdc99984084c9d11f4df6 Mon Sep 17 00:00:00 2001 From: Nickson Kaigi Date: Wed, 29 Jul 2015 21:04:58 +0300 Subject: [PATCH] reworked the settings file to use a mordern, flexible django settings layout. Updated the templates to use the static template tag. Update main.js to pull images from the static URL --- README.md | 3 +-- django-project/public/index.html | 25 ++++++++++++----------- django-project/public/js/main.js | 4 ++-- django-project/settings.py | 35 ++++++++++++++++++++------------ 4 files changed, 38 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index ac4f54d..437f9fa 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,8 @@ pip install -r requirements.txt To start the server on port, for example, 8282, run the following command: ``` -python manage.py runserver 0.0.0.0:8282 --insecure +python manage.py runserver 0.0.0.0:8282 ``` -Note: `--insecure` is needed to load the static files locally. ## Run tests diff --git a/django-project/public/index.html b/django-project/public/index.html index 7ad01c0..6b79d1f 100644 --- a/django-project/public/index.html +++ b/django-project/public/index.html @@ -1,3 +1,4 @@ +{% load staticfiles %} @@ -12,18 +13,18 @@ - - - - - - - - - + + + + + + + + + - + @@ -35,7 +36,7 @@
- +

Fill in the form and submit it

@@ -65,7 +66,7 @@

Fill in the form and submit it

- +