8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-12 21:06:27 +00:00
re2o/cotisations/payment_methods/__init__.py

26 lines
583 B
Python
Raw Normal View History

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