Will & Skill Developers

Will & Skill Developers


Thoughts, snippets and ideas from the team at Will & Skill AB, Stockholm.

Tags


avrt

Django

Tips for a cleaner Django settings.py

Clean paths import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # The root of the git repo - Could be ~/project or ~/repo REPO_DIR = os.path.realpath(os.path.join(BASE_DIR, '..')) # The directory of…

Faisal M Faisal M