Tuesday, February 5, 2019

settings.py work in local but not on the server

Hello,

It's my first time developing in Python, I'm curently working on a website using Django and I'm facing a problem when I try to configure the test serveur.
The server is hosted on gandi.net, and I'm using git to push my modifications on it. I verified using ftp, the files are correctly up to date.

When I run the code in local, everything work fine, and the settings.py is taken into account (the db is working and I see the difference when switching Debug to false).
But on the server, no matter what I do, Debug stay on True and Allowed_Host = []

The commands used to put the data on the server are :
  • git push gandi master
  • ssh {xxxxxxx}@git.sd3.gpaas.net deploy default.git
I also tried a few time with a clean.

On the server, when trying to access a page, I got this message :
disallowedHost.PNG


The debug page on the server show this :

settings.PNG


But in settings.py :

DEBUG = False
ALLOWED_HOSTS
= ['v2.usitoo.be']


I'm still learning python and don't know what I did wrong, is it possible that something override settings.py somehow ?



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8eee19ee-5abc-44c3-b820-5bacce886729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment