diff options
Diffstat (limited to 'src/meetingtools/ac/__init__.py')
-rw-r--r-- | src/meetingtools/ac/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/meetingtools/ac/__init__.py b/src/meetingtools/ac/__init__.py new file mode 100644 index 0000000..1250a5f --- /dev/null +++ b/src/meetingtools/ac/__init__.py @@ -0,0 +1,12 @@ +from meetingtools.ac.api import ACPClient + +def ac_api_client_cached(request,acc): + tag = 'ac_api_client_%s' % acc.name + if not request.session.has_key(tag): + request.session[tag] = ACPClient(acc.api_url,acc.user,acc.password) + + return request.session[tag] + +def ac_api_client(request,acc): + return ACPClient(acc.api_url,acc.user,acc.password) +
\ No newline at end of file |