Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## app1/constants.py
- MY_VAR = 100
- ## app1/settings.py
- from django.conf import settings
- from app1 import constants
- MY_VAR = getattr(settings, 'MY_VAR', constants.MY_VAR)
- ## app1/views.py
- from django.conf import settings
- from app1 import settings as app1_settings
- print app1_settings.MY_VAR
- ## project/settings/__init__.py
- # MY_VAR = 200
Add Comment
Please, Sign In to add comment