Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
django 1.5 Project and Base Directory variables
import os
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.abspath(os.path.join(PROJECT_DIR, '../../'))
# URL prefix for static files.
# Example: "", ""
STATIC_URL = '/static/'
# Additional locations of static files
BASE_DIR + '/static/',
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment