问题
I have a Django project that I've pushed to Bitbucket. I pulled the Django project from Bitbucket onto my production server. When I made my site live, I made various changes to the settings.py file. E.g. I set
SECURE_SSL_REDIRECT=True
I then pushed these changes to my repository on Bitbucket.
I then made changes to my Django project on my local, development server. I wanted to push these changes to my repository, but I was notified that first I would need to merge the repository with my local machine. I did this and then I had the settings.py file from my production environment on my development server. I changed the settings.py file so that it is suited for development purposes once again. E.g. I reset
SECURE_SSL_REDIRECT = False
Now when I run 'python manage.py runserver', I get a message saying "You're accessing the development server over HTTPS, but it only supports HTTP"
I've flushed out the database and I've reset the settings.py file to the way it was, but I still receive this error. Does anyone have any suggestions?
来源:https://stackoverflow.com/questions/36399206/django-unenforce-https-connection-on-development-server