Revision 96b44c04 snf-astakos-app/astakos/im/views.py
b/snf-astakos-app/astakos/im/views.py | ||
---|---|---|
66 | 66 |
from django.views.decorators.http import require_http_methods |
67 | 67 |
from django.db.models import Q |
68 | 68 |
from django.core.exceptions import PermissionDenied |
69 |
from django.utils import simplejson as json |
|
69 | 70 |
|
70 | 71 |
import astakos.im.messages as astakos_messages |
71 | 72 |
|
... | ... | |
99 | 100 |
LOGGING_LEVEL, PAGINATE_BY, |
100 | 101 |
RESOURCES_PRESENTATION_DATA, PAGINATE_BY_ALL, |
101 | 102 |
MODERATION_ENABLED) |
103 |
from astakos.im.api import get_services |
|
102 | 104 |
from astakos.im import settings as astakos_settings |
103 | 105 |
from astakos.im.api.callpoint import AstakosCallpoint |
104 | 106 |
from astakos.im import auth_providers |
... | ... | |
397 | 399 |
# providers that user can add |
398 | 400 |
user_available_providers = request.user.get_available_auth_providers() |
399 | 401 |
|
402 |
try: |
|
403 |
resp = get_services(request) |
|
404 |
except Exception, e: |
|
405 |
services = () |
|
406 |
else: |
|
407 |
services = json.loads(resp.content) |
|
408 |
extra_context['services'] = services |
|
400 | 409 |
return render_response(template_name, |
401 | 410 |
profile_form = form, |
402 | 411 |
user_providers = user_providers, |
Also available in: Unified diff