Skip to content

Instantly share code, notes, and snippets.

@corysimmons
Created October 17, 2012 18:37
Show Gist options
  • Save corysimmons/3907276 to your computer and use it in GitHub Desktop.
Save corysimmons/3907276 to your computer and use it in GitHub Desktop.
Django settings.py relative project path function
def project_path(dir):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), dir)
# Usage
TEMPLATE_DIRS = (
project_path('templates'),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment