Windows 7
Python 2.7.3
Django 1.5
python manage.py runserver
I am following the tutorial as available at \'https://docs.djangoproject.com/en/1.5/intro/tu
As I can see you have a little mistake, but dont worry.
Look, try this:
handler404 = 'mysite.views.error404'
Then in mysite (the second mysite) creates a views.py if you dont have. In that views.py put:
from django.shortcuts import render
def error404(request):
return render(request,'404.html')
and thats all! In templates, create that file and do something nice!
Remember that only works in production (DEBUG=False)
otherwise django use the traceback.
Is the same for 505, and you maybe can try handler404 = 'polls.views.see404'
and put in the views.py then but you know, tastes are different hehehe.
Now, try something else, for example: comment in the urls.py
#handler404 = 'mysite.views.error404'
and remove too in the views.py the def.
In the index of your templates file creates a simple 404.html. Run the server in production and produce that 404 error, what happened?