Answer the question
In order to leave comments, you need to log in
How to store tracebacks in models?
I'm making a control panel that shows website statistics. I want to count how many 500 errors there were on the site (I can easily do this myself) and save their tracebacks in the model:
class ErrorStore(models.Model):
error_code = models.IntegerField() #код ошибки
traceback = models.TextField() #текст ошибки
Answer the question
In order to leave comments, you need to log in
When you start the production server, debugging will be disabled in your settings (DEBUG = False) and users will not see a 500 or 404 error. Django has an email error reporting tool for this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question