main url will not load

my will not allow Django to run the server.

The error message visual studio code gives when I hover over the red squiggly line that visual studio gives over the URL patterns [ is: “[” was not closed.

Can anyone explain to me what that error message means and how to solve it?

Also, I am trying to get my Django server to run the server on its own. But it will not open the main page. It was able to run the other paths when I put the URL after the /‘finance’ or /‘ingredients’ respectively but that was before the bug popped up. I am certain the error is tied to preventing Django to load the server.

from django.contrib import admin
from django.urls import include, path
from django.http import HttpResponse

urlpatterns = [ # <----- error is on this thing
    path('admin/',name ='inventory',
    path('finance/', finance, name='finance'),
    path('home/', home, name='home'), #I am attempting to connect the home_view function with the views function.
    path('ingredients/', ingredients, name='ingredients'),
    path('menu/', menu, name='menu'),
    path('purchases/', purchases, name='purchases'),]

you need to import view functions:

from .views import home_view, finance,…etc

urlpatterns = [
path(‘home/’, home_view, name='home),


The syntax of this line is incorrect:

1 Like