update urls.pyes to use path() and add some tests
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
from django.conf.urls import url
|
||||
from django.urls import path
|
||||
|
||||
from races.views import index, race_detail
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', index, name='races_index'),
|
||||
url(r'^race/(?P<race_id>[A-Za-z0-9]+)/$', race_detail, name='race_detail'),
|
||||
path('', index, name='races_index'),
|
||||
path('race/<race_id>/', race_detail, name='race_detail'),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user