Hi,
I'm the author of Django Unleashed. A second edition is in the works, but it is taking some time (I'm also working on a video series).
Django 2.0 introduced a simplified system for URLs.
https://docs.djangoproject.com/en/2.0/releases/2.0/#simplified-url-routing-syntax
If you want wish to use the new syntax while following along with the examples in Django Unleashed, you have two choices.
Choice 1: replace regular expression syntax with the simplified syntax, using path matchers at the link below instead of regular expression patterns.
https://docs.djangoproject.com/en/2.0/topics/http/urls/#path-converters
In this case, the code below...
from django.conf.urls import url
...
url(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', viewCallable)
would be replaced with...
from django.urls import path
...
path('articles/<int:year>/<int:month>/<slug:slug>/', viewCallable)
Note that viewCallable is pseudocode for a function view or class-based view (viewClass.as_view()).
This involves changing every URL path (and now you know why the second edition is taking forever). Please note the new imports.
Choice 2: Use Django's new `re_path()` function instead of `url()` to fallback on original Django behavior.
In this case, the code below...
from django.conf.urls import url
...
url(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', viewCallable)
would be replaced with...
from django.urls import re_path
...
re_path(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', viewCallable)
Only the function has changed: the regex pattern has not.
Read more about that at the link below.
https://docs.djangoproject.com/en/2.0/topics/http/urls/#using-regular-expressions
I might recommend using Choice 2 when following along with the book, but to give Choice 1 a whirl (after reading Django's documentation) on a new project as it's easier to read.
I hope this helps!
Andrew
http://jambonsw.com
http://django-unleashed.com