Created
October 17, 2012 18:37
-
-
Save corysimmons/3907276 to your computer and use it in GitHub Desktop.
Django settings.py relative project path function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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