Forums

No errors shown on failed Django deploy...how to troubleshoot?

First time setting up a Django app on PA - following https://help.pythonanywhere.com/pages/DeployExistingDjangoProject explicitly. I get the initial django screen showing all is right with the world when I have the unmodified wsgi file but then after just "Something went wrong :-( "...

I am looking for logs but dont know where things are on PA.... I suspect my directory structure is wrong but it could be anything...

Any pointers you can suggest?

Thanks in advance

Things on PA are in your home directory or in /var/ directory. So, your web app code is where you put it, if you want an easy access to the wsgi file -- the link is on your Web app page. If you look at the bottom of the error log (link on the Web app page too), so at the most recent errors, you'll find that there are import errors. Because it's a quite frequent issue, we have a help page dedicated for that one: https://help.pythonanywhere.com/pages/DebuggingImportError/.

OK! Found the logs.

Ha....I THINK it was wrong casing...if it worked locally on my machine (Win10) and on Azure - but not on Linux...what could it be? So I was camelCasing except with the setup in PA (my wsgi file) so projectName was not the same as projectname and I got a ModuleNotFoundError. Once corrected I now I get a db error because I had been trying for PostreSQL - and need a MySQL setup.....By Jove, I think Ive got it!

Thanks