X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/540e76dd8e04d7bab431da696565e826788bd218..7a27a3fbc14b2049b8d110db15855a625e4c2455:/src/social/api/urls.py?ds=inline diff --git a/src/social/api/urls.py b/src/social/api/urls.py index 8ded909b4..43036f63c 100644 --- a/src/social/api/urls.py +++ b/src/social/api/urls.py @@ -1,12 +1,16 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # -from django.conf.urls import include, url +from django.urls import path +from stats.utils import piwik_track_view from . import views urlpatterns = [ - url(r'^like/(?P[a-z0-9-]+)/$', views.LikeView.as_view(), name='social_api_like'), - url(r'^shelf/(?P[a-z]+)/$', views.ShelfView.as_view(), name='social_api_shelf'), + path('like//', + piwik_track_view(views.LikeView.as_view()), + name='social_api_like'), + path('shelf//', + piwik_track_view(views.ShelfView.as_view()), + name='social_api_shelf'), ]