#๐Ÿ”’ DJANGO - Server Error (500)

19 messages ยท Page 1 of 1 (latest)

late jungle
#

I had an existing/working Django App and when I added some new views (basic pages with static information) I couldn't access these new views when DEBUG=False
The only error I can see on console when the Debug=True is: Failed to load resource: the server responded with a status of 500 ()
The rest of the app is working properly, only the new views occur this problem... I am hosting it at Namecheap Stellar Hosting.
Any idea?!

midnight grailBOT
#

@late jungle

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

late jungle
#

I also have this error but I can not find anything on my JS related to this one

deft oak
#

when you're running debug as false, you're in production mode and django no longer handles static content for you

late jungle
deft oak
#

oh ok, well ask on that server anyway, it's django focused

late jungle
late jungle
#

Anyone giving suggestions is welcomed

acoustic jetty
#

also check png files sometimes get saved with capital letters, like PNG. Apparently that was causing a problem with whitenoise.

late jungle
#

What is this doing btw?
WHITENOISE_AUTOREFRESH = True

#

The whitenoise.storage.CompressedManifestStaticFilesStorage class uses hashed filenames for static files and can cause issues if there are discrepancies or if the static files are not properly collected and served. By switching to django.contrib.staticfiles.storage.StaticFilesStorage"

acoustic jetty
midnight grailBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.