http status code 404 - Can you have more than one app handle a 404 in Django? -
Apparently, the way Deggango works flatpages, it is 404 by throwing it off by another app . I was wondering if I can do another flat-type app that becomes a crack in 404 before the flat screen. I have tried it without success yet. A template is sung but does not come through the data.
Is this possible?
According to the DJO Docs, you can specify your own view as a 404 or 500 handler. :
handler 404 = 'mysite.views.my_custom_404_view' Therefore, the app that handles your app's custom code with views.py < / Code>, you can set up as a handler in your urls.py <404 or 500
For more information, see.
Comments
Post a Comment