from django.conf.urls import url from races.views import index, race_detail urlpatterns = [ url(r'^$', index, name='races_index'), url(r'^race/(?P[A-Za-z0-9]+)/$', race_detail, name='race_detail'), ]