Using the URLconf defined in learnpy.urls, Django tried these URL patterns, in this order: [name='index'] admin/ The current path, Envs/python-projects/learnpy/static/styles/bootstrap4/bootstrap.min.css, didn't match any of these.
Above error occuring in create django static page Please help me
See belowe image:
Myapp url: travello/urls.py
from django.urls import path
from . import views
urlpatterns = [ path('',views.index, name='index')]
Main app urls: learnpy/urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('', include('travello.urls')),
path('admin/', admin.site.urls),
]
Myapp view file: travello/views.py
from django.shortcuts import render
def index(request):
return render(request, 'index.html')
In index.html
{% load static %}
set above code in my index.html file