X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/93da6796796d43def17c8adde0f194489cc14b01..f546d1dd07dd4d86e1dcde26a1b02f0ffe783f7c:/src/newsletter/urls.py?ds=sidebyside

diff --git a/src/newsletter/urls.py b/src/newsletter/urls.py
index a34d98c41..2b0a6f159 100644
--- a/src/newsletter/urls.py
+++ b/src/newsletter/urls.py
@@ -1,12 +1,16 @@
-# -*- 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 django.views.generic import RedirectView
 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]+)/$',
-        views.confirm_subscription, name='confirm_subscription'),
-    url(r'^wypisz-sie/$', views.unsubscribe_form, name='unsubscribe'),
-    url(r'^wypisano/$', views.unsubscribed, name='unsubscribed'),
+    path('zapisz-sie/', views.subscribe_form, name='subscribe'),
+    path('zapisz-sie/<slug:slug>/', views.subscribe_form, name='subscribe'),
+    path('zapis/', views.subscribed, name='subscribed'),
+    path('wypisz-sie/', RedirectView.as_view(
+            url='https://mailing.mdrn.pl/?p=unsubscribe',
+            permanent=False,
+        ), name='unsubscribe'),
 ]