X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/468c2e650c854ffa691afc73aa1f41ce61283cdb..c9eb7a8fa361ac38b7c0f5a21cc386fc428bbf57:/src/paypal/urls.py?ds=inline diff --git a/src/paypal/urls.py b/src/paypal/urls.py index 924cedd95..7adf644a2 100644 --- a/src/paypal/urls.py +++ b/src/paypal/urls.py @@ -1,12 +1,15 @@ -# -*- 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'^return/$', views.paypal_return, name='paypal_return'), - url(r'^cancel/$', views.paypal_cancel, name='paypal_cancel'), + path('form/', RedirectView.as_view(url='/towarzystwo/dolacz/')), + path('app-form/', RedirectView.as_view(url='/towarzystwo/dolacz/app/')), + + 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'), )