Django implementation of http404

Page implementation not found in django and looked through 404 documentation

I do not get the page not found error, while ami is doing here

In my code in the urls, I did the following,

url(r'^$', 'site_config.views.pagenotfound') 

from django.http import Http404

  def pagenotfound(request): return render_to_response('polls/pagenotfound.html', {}) 
0
django django-views
Aug 29 2018-12-12T00:
source share
1 answer

How do you handle 404 and 500 in django: by default create 404.html in the templates directory

If you need a custom handler, just add it to urls.py

 handler404 = 'views.page_not_found_custom' handler500 = 'views.page_error_found_custom' 

create the 404.html page the way you want

+3
Aug 29 '12 at 14:39
source



All Articles