Admin site error reporting

42 views
Skip to first unread message

Dieter Gyselinck

unread,
Oct 22, 2019, 8:32:50 AM10/22/19
to Django users
When a change form is accessed in the admin site and an error occurs we receive an error screen if debug equals True.  If I  run into the same error on production, where debug equals False, I don't receive an error email.  The error handling is probably configured correctly as I do get error emails when the error occurs outside of the admin pages.  I have the impression that there is an issue with the error reporting in the admin.  Does anybody know what is happening and is there a possible solution?  

Derek

unread,
Oct 23, 2019, 4:57:05 AM10/23/19
to Django users
Does the normal logging work i.e. are you seeing those errors reported in the log files?  And do you have trapping/handling for the email-sending code as well?

Also have a look at: 
for a brief discussion around the difference between running your app with DEBUG on or off and how logging can help with this.

Dieter Gyselinck

unread,
Oct 23, 2019, 7:52:20 AM10/23/19
to Django users
Thanx for the response.  The normal logging works, I see errors in the error log file if they occur outside the Django Admin.  However, the error with the change form in the admin does not occur in the logfiles.  Same behaviour as with the error mailing.  

Op woensdag 23 oktober 2019 10:57:05 UTC+2 schreef Derek:

Derek

unread,
Oct 23, 2019, 12:44:36 PM10/23/19
to Django users
Well, assuming you have followed all the advice given in that link I posted and have eliminated all those sources of error, then it seems like you will need to add more error trapping to pin down where the error occurs.  If the log files are not been written to (which itself seems problematic & you'll need to see why), then try simply writing out key steps to a text file so you can at least see where your code is malfunctioning.
Reply all
Reply to author
Forward
0 new messages