Changed from custom attribute callback to signal for collecting custom attributes.
[django-cas-provider.git] / cas_provider / __init__.py
1 from django.conf import settings
2
3 __all__ = []
4
5 _DEFAULTS = {
6     'CAS_TICKET_EXPIRATION': 5, # In minutes
7     'CAS_CUSTOM_ATTRIBUTES_CALLBACK': None,
8     'CAS_CUSTOM_ATTRIBUTES_FORMATER': 'cas_provider.attribute_formatters.jasig',
9     'CAS_AUTO_REDIRECT_AFTER_LOGOUT': False,
10 }
11
12 for key, value in _DEFAULTS.iteritems():
13     try:
14         getattr(settings, key)
15     except AttributeError:
16         setattr(settings, key, value)
17     except ImportError:
18         pass