2. Creating first page
from django.urls import path, include #? Added the include function to use the urls from the store apppath('', include('store.urls')), #? all the links from the store app will be loaded on the root url (as we will only use one app, 'store')def homepage():
passfrom django.urls import path
from .views import * #? Importing everything from the views folder in the same directory
urlpatterns = [
path('', homepage, name="homepage"), #? first parameter is the url, second is what function will be runned at the url, and the third is the internal name of the link used to reference the link regardless of its url domain
]

Last updated