Skip to content

Instantly share code, notes, and snippets.

@harmstyler
Created November 14, 2013 18:37
Show Gist options
  • Save harmstyler/7472030 to your computer and use it in GitHub Desktop.
Save harmstyler/7472030 to your computer and use it in GitHub Desktop.
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: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
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