Skip to content

Instantly share code, notes, and snippets.

@morganpierson
Created December 21, 2019 01:31
Show Gist options
  • Save morganpierson/532be4bc1d38715713190a1d41aa82f1 to your computer and use it in GitHub Desktop.
Save morganpierson/532be4bc1d38715713190a1d41aa82f1 to your computer and use it in GitHub Desktop.
from django.urls import path
from . import views
# import path module to be used for each route definition
# import entire views module so we can access each of its view functions (similar to controllers)
# create urlpatterns list container for each view function we create for a corresponding path
# empty "" indicates the path '/' in django
urlpatterns = [
path('', views.home, name='home'),
path('schedule/', views.schedule, name='schedule')
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment