Skip to content

Instantly share code, notes, and snippets.

@tarvitz
Created July 25, 2014 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarvitz/c8e5359e49ab591cfa8f to your computer and use it in GitHub Desktop.
Save tarvitz/c8e5359e49ab591cfa8f to your computer and use it in GitHub Desktop.
settings.py
# coding: utf-8
import os
PROJECT_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
def rel(*path):
"""returns absolute path from topside (root) of the project
:param path: relative path
:return: absolute path
"""
return os.path.join(PROJECT_ROOT, *path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment