Created
March 4, 2023 20:05
-
-
Save ILoveBacteria/d375fed2637f39e2733213b910e0666f to your computer and use it in GitHub Desktop.
Create paths in Django
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mysite/urls.py | |
from django.contrib import admin | |
from django.urls import include, path | |
urlpatterns = [ | |
path('polls/', include('polls.urls')), | |
path('admin/', admin.site.urls), | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# polls/urls.py | |
from django.urls import path | |
from . import views | |
urlpatterns = [ | |
path('', views.index, name='index'), | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment