0

I have example code in view:

try bla-bla-bla except return 500 status

How to view error in this try in error.log for Django ( for example if Django run on mod-python in Apache ) ?

Bdfy
  • 23,141
  • 55
  • 131
  • 179

2 Answers2

2

this answer your question:

Django Unhandled Exception

Community
  • 1
  • 1
diegueus9
  • 29,351
  • 16
  • 62
  • 74
0

Print to sys.stderr, or better yet, use logging.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358