the original book uses the old version, but now the purchasing agent for routing from django to version 2.0 is different
the original urls.py is like this
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
]url(r"^admin/", include(admin.site.urls)),
url(r"", include("learning_logs.urls", namespace="learning_logs")),
]
after changing it for a long time, it can"t be changed. Mine is django2.0, code like this:
from django.urls import path
from. Import views
urlpatterns = [
]path(r"admin/", views.index),
path(r"/", "learning_logs.urls", namespace="learning_logs"),
]