skip to Main Content

I have my site running on a CentOS server, and list view is fine, but when I click on a link to go to a detail view, I now get a Server Error (500).There are no errors in the nginx logs, and I don’t know where else to look to debug these. I have just upgraded to django 3, I’m suspecting there is something that I have not corrected for the upgrade, but I don’t know what that would be as I am not getting any error messages or stack trace, just Server Error (500). What can I do to find the issue please?

2

Answers


  1. Chosen as BEST ANSWER

    SOLVED: Whilst I thought I had changed all the

    {% load staticfiles %} 
    

    to

    {% load static %}
    

    I had missed one that was in an extended template that required this tag. Changing that too solved the issue. There was one other issue that was affecting this site and giving a Server Error (500) on another page too, and that is that in django 3.0, it looks like they are enforcing styling also, so I had to change:

    {% static 'project_portal/images/icon_add_circle.png'%}
    

    by adding a space between the last ' and the % so this:

    {% static 'project_portal/images/icon_add_circle.png' %}
    

    I am usually quite ocd about my styling but I missed this and it's now an issue in Django 3.


  2. You’re probably aware of it, but have you activated Debug mode in the settings.py? So far I always got a very detailed error report on reload when I broke something. Did you change any of the models? I would make sure that your migrations are up to date and you don’t ask for any unnamed variables, but you probably already know that.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search