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 4 years, 11 months ago
- set_paths by amitu 3 years, 3 months ago
- djangopath: conveniently set sys.path and DJANGO_SETTINGS_MODULE by alia_khouri 3 years, 6 months ago
- FirstRun Middleware by TheMysteriousX 9 months, 1 week ago
- Paths in Django settings relative to settings.py by zejn 4 years, 3 months ago
Comments