mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-30 11:51:10 +02:00
Add survey feature
This commit is contained in:
@ -3,16 +3,18 @@
|
||||
|
||||
import os
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
_client = None
|
||||
|
||||
|
||||
def get_sympa_client():
|
||||
global _client
|
||||
if _client is None:
|
||||
if os.getenv("SYMPA_PASSWORD", None): # pragma: no cover
|
||||
if settings.SYMPA_PASSWORD is not None: # pragma: no cover
|
||||
from sympasoap import Client
|
||||
_client = Client("https://" + os.getenv("SYMPA_URL"))
|
||||
_client.login(os.getenv("SYMPA_EMAIL"), os.getenv("SYMPA_PASSWORD"))
|
||||
_client = Client("https://" + settings.SYMPA_URL)
|
||||
_client.login(settings.SYMPA_EMAIL, settings.SYMPA_PASSWORD)
|
||||
else:
|
||||
_client = FakeSympaSoapClient()
|
||||
return _client
|
||||
|
Reference in New Issue
Block a user