X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8887547a016bbf665ffc4175346f655f0dfa63fb..ba83b8311a93602de7f733c9a9e183e3ebbb006c:/src/paypal/urls.py diff --git a/src/paypal/urls.py b/src/paypal/urls.py index 468870bfe..cc4523f9b 100644 --- a/src/paypal/urls.py +++ b/src/paypal/urls.py @@ -1,14 +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. # -from django.conf.urls import url +from django.urls import path +from django.views.generic import RedirectView from . import views urlpatterns = ( - url(r'^form/$', views.paypal_form, name='paypal_form'), - url(r'^app-form/$', views.paypal_form, kwargs={'app': True}, name='paypal_api_form'), - url(r'^return/$', views.paypal_return, name='paypal_return'), - url(r'^app-return/$', views.paypal_return, kwargs={'app': True}, name='paypal_api_return'), - url(r'^cancel/$', views.paypal_cancel, name='paypal_cancel'), + path('form/', RedirectView.as_view(url='/pomagam/')), + path('app-form/', RedirectView.as_view(url='/pomagam/?pk_campaign=aplikacja')), + + path('init//', views.paypal_init, name='paypal_init'), + path('return//', views.paypal_return, name='paypal_return'), + path('app-return//', views.paypal_return, kwargs={'app': True}, name='paypal_app_return'), + path('cancel/', views.paypal_cancel, name='paypal_cancel'), )