Django Tutorial - Video 1 - Project Settings and Configuration

This tutorial walks through the steps to setup and configure a new django project from scratch. It goes over the apache configuration as well as the mod_wsgi configuration necessary to start a new django project. It also goes over database creation and focuses on completing the settings.py configuration file.


django.wsgi file:

import os
import os.path
import sys

sys.path.append('/he/django')
sys.path.append('/he/django/video1')

os.environ['PYTHON_EGG_CACHE'] = '/he/django/egg_cache'
os.environ['DJANGO_SETTINGS_MODULE'] = 'video1.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Relevant lines from apache config file:

Alias /media/ /he/sites/video1.hackedexistence.com/htdocs/media/
Alias /static/ /he/sites/video1.hackedexistence.com/htdocs/static/

WSGIScriptAlias / /he/django/video1/apache/django.wsgi