0

I want to override default Error Page to hide META Block in any way.

Meta Block contains all sensitive Info. which i don't want to be in Views for any user. Django Error Page

Deepak Sharma
  • 1,401
  • 19
  • 21

2 Answers2

0

Looks like debug is True. Please see debug option

How to override default error pages: Django, creating a custom 500/404 error page

funnydman
  • 9,083
  • 4
  • 40
  • 55
0

Refer this Django Error Report which will give you error report log when DEBUG is False

When you’re running a public site you should always turn off the DEBUG setting.

However, running with DEBUG set to False means you’ll never see errors generated by your site – everyone will just see your public error pages. You need to keep track of errors that occur in deployed sites, so Django can be configured to create reports with details about those errors.

Possible answer for your question is here

rahul.m
  • 5,572
  • 3
  • 23
  • 50
  • Yes, We should set DEBUG=False every time in production Env, but there are cases when we can't set so, we need to see Errors, like in TEST Env. Issue occurs when Credentials used at TEST env. should not leak. So, to avoid that case we need to Override Default Error Page. – Deepak Sharma Jan 10 '19 at 07:02
  • just try this https://docs.djangoproject.com/en/2.0/ref/views/#the-500-server-error-view – rahul.m Jan 10 '19 at 07:14
  • Above link, says, "If DEBUG is set to True (in your settings module), then your 500 view will never be used, and the traceback will be displayed instead, with some debug information" – Deepak Sharma Jan 10 '19 at 07:30
  • This above method is use to override django default error Message page – rahul.m Jan 10 '19 at 07:32
  • Yes, True but only when Debug=False – Deepak Sharma Jan 10 '19 at 07:34