Updated manage.py and settings.py to work with newer django versions