add code in settings.py for dynamic paths and the template path