Fixes #4076: Recommendations from collections.
[wolnelektury.git] / src / newsletter / urls.py
index 566f777..2b0a6f1 100644 (file)
@@ -1,7 +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'^wypisz-sie/$', views.unsubscribe, name='unsubscribe'),
+    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'),
 ]