refactor settings.py template