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
- Effective content caching for mass-load site using redirect feature by nnseva 1 year, 10 months ago
- FirstRun Middleware by TheMysteriousX 2 years ago
- djangopath: conveniently set sys.path and DJANGO_SETTINGS_MODULE by alia_khouri 4 years, 9 months ago
- X-Sendfile static file serve view by dokterbob 2 years, 7 months ago
- Automagically import settings from installed applications by jezdez 5 years, 3 months ago
Comments