8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-06-18 00:28:11 +00:00
re2o/cotisations/payment_methods/__init__.py

26 lines
583 B
Python

from django.conf.urls import include, url
from django.utils.translation import ugettext_lazy as _l
from . import comnpay, cheque
urlpatterns = [
url(r'^comnpay/', include(comnpay.urls, namespace='comnpay')),
url(r'^cheque/', include(cheque.urls, namespace='cheque')),
]
PAYMENT_METHODS = [
comnpay,
cheque,
]
def find_payment_method(payment):
for method in PAYMENT_METHODS:
try:
o = method.PaymentMethod.objects.get(payment=payment)
return o
except method.PaymentMethod.DoesNotExist:
pass
return None