- url(r'^reading/(?P<slug>[a-z0-9-]+)/$',
- piwik_track_view(views.BookUserDataView.as_view()),
- name='api_reading'),
- url(r'^reading/(?P<slug>[a-z0-9-]+)/(?P<state>[a-z]+)/$',
- piwik_track_view(views.BookUserDataView.as_view()),
- name='api_reading'),
- url(r'^username/$',
- piwik_track_view(views.UserView.as_view()),
- name='api_username'),
+ path('reading/<slug:slug>/',
+ piwik_track_view(views.BookUserDataView.as_view()),
+ name='api_reading'),
+ path('reading/<slug:slug>/<slug:state>/',
+ piwik_track_view(views.BookUserDataView.as_view()),
+ name='api_reading'),
+ path('username/',
+ piwik_track_view(views.UserView.as_view()),
+ name='api_username'),