-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
hi how are you .
tutorial link:
https://realpython.com/get-started-with-django-1/
your code:
blog/urls.py
from django.urls import path
from . import views
urlpatterns = [
path("", views.blog_index, name="blog_index"),
path("<int:pk>/", views.blog_detail, name="blog_detail"),
path("<category>/", views.blog_category, name="blog_category"),
]
my question is :why if my change code to :
blog/urls.py
from django.urls import path
from . import views
urlpatterns = [
path("", views.blog_index, name="blog_index"),
path("<category>/", views.blog_category, name="blog_category"),
path("<int:pk>/", views.blog_detail, name="blog_detail"),
]
do not work? only function "blog_category" is work (priority is important in urls.py or no).
good luck
god willing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels