N
N
neulwert2019-11-24 16:38:57
Django
neulwert, 2019-11-24 16:38:57

What's wrong with line 8?

Code from "django 2 by examples" book, invalid syntax(, line 8):

from django.urls import path
from . import views

app_name='blog'

urlpatterns=[
    path('', views.post_list, name='post_list')
    path('<int:year>/<int:month>/<int:day>/<slug:post>/', views.post_detail, name='post_detail')
]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
YuriyCherniy, 2019-11-24
@neulwert

No comma between urlpatterns list items.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question