Revision 0dd46210 snf-astakos-app/astakos/im/activation_backends.py
b/snf-astakos-app/astakos/im/activation_backends.py | ||
---|---|---|
56 | 56 |
""" |
57 | 57 |
Returns an instance of an activation backend, |
58 | 58 |
according to the INVITATIONS_ENABLED setting |
59 |
(if True returns ``astakos.im.activation_backends.InvitationsBackend`` and if False |
|
59 |
(if True returns ``astakos.im.activation_backends.InvitationsBackend`` |
|
60 |
and if False |
|
60 | 61 |
returns ``astakos.im.activation_backends.SimpleBackend``). |
61 | 62 |
|
62 |
If the backend cannot be located ``django.core.exceptions.ImproperlyConfigured``
|
|
63 |
is raised. |
|
63 |
If the backend cannot be located |
|
64 |
``django.core.exceptions.ImproperlyConfigured`` is raised.
|
|
64 | 65 |
""" |
65 | 66 |
module = 'astakos.im.activation_backends' |
66 | 67 |
prefix = 'Invitations' if INVITATIONS_ENABLED else 'Simple' |
... | ... | |
73 | 74 |
try: |
74 | 75 |
backend_class = getattr(mod, backend_class_name) |
75 | 76 |
except AttributeError: |
76 |
raise ImproperlyConfigured('Module "%s" does not define a activation backend named "%s"' % (module, backend_class_name)) |
|
77 |
raise ImproperlyConfigured( |
|
78 |
'Module "%s" does not define a activation backend named "%s"' % ( |
|
79 |
module, backend_class_name)) |
|
77 | 80 |
return backend_class(request) |
78 | 81 |
|
79 | 82 |
|
Also available in: Unified diff