From 97f1a5787085bd52bcea28edf10204bd9c2d43d2 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 19 Apr 2014 19:54:06 -0400 Subject: Get example django project up & running The minimum amount of configuration necessary to get the example Django project to serve a static index page. --- examples/djangoproject/djangoproject/settings.py | 15 +++++---------- examples/djangoproject/djangoproject/templates/base.html | 15 +++++++++++++++ examples/djangoproject/djangoproject/templates/index.html | 6 ++++++ examples/djangoproject/djangoproject/urls.py | 14 ++------------ 4 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 examples/djangoproject/djangoproject/templates/base.html create mode 100644 examples/djangoproject/djangoproject/templates/index.html (limited to 'examples/djangoproject') diff --git a/examples/djangoproject/djangoproject/settings.py b/examples/djangoproject/djangoproject/settings.py index 68059e0..d572de8 100644 --- a/examples/djangoproject/djangoproject/settings.py +++ b/examples/djangoproject/djangoproject/settings.py @@ -1,13 +1,10 @@ -# Django settings for djangoproject project. +import os -DEBUG = True -TEMPLATE_DEBUG = DEBUG -ADMINS = ( - # ('Your Name', 'your_email@example.com'), -) +PROJECT_ROOT = os.path.dirname(__file__) -MANAGERS = ADMINS +DEBUG = True +TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { @@ -106,9 +103,7 @@ ROOT_URLCONF = 'djangoproject.urls' WSGI_APPLICATION = 'djangoproject.wsgi.application' TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. + os.path.join(PROJECT_ROOT, 'templates'), ) INSTALLED_APPS = ( diff --git a/examples/djangoproject/djangoproject/templates/base.html b/examples/djangoproject/djangoproject/templates/base.html new file mode 100644 index 0000000..5611973 --- /dev/null +++ b/examples/djangoproject/djangoproject/templates/base.html @@ -0,0 +1,15 @@ + +{% load static %} + +
+ + +