1 2 3 4 5 6 7 8 9 10 11 12 13 | import os
#ROOT : the django proyect root
ROOT = lambda base : os.path.join(os.path.dirname(__file__), base).replace('\\','/')
#usage examples
DATABASE_NAME = ROOT('data/mydb.db')
TEMPLATE_DIRS = (
ROOT('templates'),
)
#...
|
More like this
- Dynamically specify TEMPLATE_DIRS by ajs17 5 years, 2 months ago
- set_paths by amitu 3 years, 7 months ago
- djangopath: conveniently set sys.path and DJANGO_SETTINGS_MODULE by alia_khouri 3 years, 9 months ago
- FirstRun Middleware by TheMysteriousX 1 year ago
- Paths in Django settings relative to settings.py by zejn 4 years, 7 months ago
Comments