Refactored for settings.py