Tuesday, February 5, 2019

Re: settings.py work in local but not on the server

How is your server invoked? Is it using apache and wsgi.py ? If so, you may need to either restart the server or touch wsgi.py to force the server to byte-compile the new files. 

One trick is to put a syntax error in a file. If the server doesn't barf, then you know this is the problem.

Jeremy Mordkoff
VP &  Webmaster, www.othsl.org

 



On Tue, Feb 5, 2019 at 12:56 PM Gil Obradors <gil.obradors@gmail.com> wrote:
Hello Robin,
Check settings.py in server again. May be git hasn't been pushed correctly

If DEBUG= False is really in server, you must recive Bad Request (400)
You see the yellow message as DEBUG=True,


Good luck

Missatge de l'adreça <robin.leroux.96@gmail.com> del dia dt., 5 de febr. 2019 a les 18:50:
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 :
I also tried a few time with a clean.

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


The debug page on the server show this :



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.

--
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/CAK-JoTSvFOH2J%2BMX7qqBR4gn%3DV6nVFLXWkUYVzy31-Z9NbO49g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CANkJ7k4EA1fg8oQ_3%3Dab3Vc5M17p6YEuoXoaJZDzh3yYW4JdGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment