Small refactor in messaging.
[wolnelektury.git] / src / newsletter / urls.py
index a34d98c..bfae579 100644 (file)
@@ -1,12 +1,14 @@
-# -*- coding: utf-8 -*-
-from django.conf.urls import url
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+from django.urls import path
 from . import views
 
 urlpatterns = [
-    url(r'^zapisz-sie/$', views.subscribe_form, name='subscribe'),
-    url(r'^zapis/$', views.subscribed, name='subscribed'),
-    url(r'^potwierdzenie/(?P<subscription_id>[0-9]+)/(?P<hashcode>[0-9a-f]+)/$',
+    path('zapisz-sie/', views.subscribe_form, name='subscribe'),
+    path('zapis/', views.subscribed, name='subscribed'),
+    path('potwierdzenie/<int:subscription_id>/<slug:hashcode>/',
         views.confirm_subscription, name='confirm_subscription'),
-    url(r'^wypisz-sie/$', views.unsubscribe_form, name='unsubscribe'),
-    url(r'^wypisano/$', views.unsubscribed, name='unsubscribed'),
+    path('wypisz-sie/', views.unsubscribe_form, name='unsubscribe'),
+    path('wypisano/', views.unsubscribed, name='unsubscribed'),
 ]