Page not found (404) error in Django
Well, I’d like to believe that, page not found 404 in Django is common error. Actually, it is very annoying error. Assuredly, it may happen we don’t know the causes and solution of this error. Absolutely, at this time we get an error that http://127.0.0.1:8000/me.html not found. Generally, the following are the possible causes and solution of this error
1. Page is not present in template folder.
This means that me.html is not present in template folder. Admittedly, template folder stores all html files in Django.
SOLUTION:
Actually, we need to create me.html and save it in template folder.
2. Page have no function in views.py
There’s no denying that every page has function in views.py file. Indeed, the absence of page function in views.py may cause this error.
SOLUTION:
Well, we need to create a function in views.py which return me.html page.
3. Page view is not defined in urls.py
Frankly speaking, when page function is created in views.py it should be defined in urls.py. Absolutely, this is called URL mapping.
SOLUTION:
Generally, we need to defined views we’ve created in url.py.
#pagenotfoundinDjango #404errorinDjango #Django #Djangonotfoundpage404error #motechapp