hi i am doing a course of python. i am creating vidly app in django. i failed to add bootstrap so everytime i load a page it says -
Page not found (404)
Using the URLconf defined in vidly.urls, Django tried these URL patterns, in this order:
- admin/
- movies/base.html
The empty path didn’t match any of these.
You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
how can i fix it?
Check your urls.py file to ensure that you have a valid URL pattern for the homepage (/). It should look something like this:
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home'),
# other URL patterns
]
Also make sure that the views.home function exists and returns a valid response.
Is there anything keeping you from adding bootstrap? It’s pretty easy.
pip install django-bootstrap4
Then just add it to your settings.py file
Copy code
INSTALLED_APPS = [
# other apps
'bootstrap4',
]
Here’s a scratch pad showing you what I mean as far as installing goes. Einblick