Update default_settings.py for python3
In python 3 dict.items do not return a copied list so we force a copy to avoid changing the global dict while iterating over it
This commit is contained in:
parent
c8a22f6c92
commit
66b9daff68
@ -104,8 +104,9 @@ CAS_SQL_DBNAME = ''
|
|||||||
CAS_SQL_DBCHARSET = 'utf8'
|
CAS_SQL_DBCHARSET = 'utf8'
|
||||||
#: The query performed upon user authentication.
|
#: The query performed upon user authentication.
|
||||||
CAS_SQL_USER_QUERY = 'SELECT user AS usersame, pass AS password, users.* FROM users WHERE user = %s'
|
CAS_SQL_USER_QUERY = 'SELECT user AS usersame, pass AS password, users.* FROM users WHERE user = %s'
|
||||||
#: The method used to check the user password. Must be one of ``crypt``, ``ldap``, ``hex_md5``,
|
#: The method used to check the user password. Must be one of ``"crypt"``, ``"ldap"``,
|
||||||
#: ``hex_sha1``, ``hex_sha224``, ``hex_sha256``, ``hex_sha384``, ``hex_sha512``, ``plain``.
|
#: ``"hex_md5"``, ``"hex_sha1"``, ``"hex_sha224"``, ``"hex_sha256"``, ``"hex_sha384"``,
|
||||||
|
#: ``"hex_sha512"``, ``"plain"``.
|
||||||
CAS_SQL_PASSWORD_CHECK = 'crypt' # crypt or plain
|
CAS_SQL_PASSWORD_CHECK = 'crypt' # crypt or plain
|
||||||
|
|
||||||
|
|
||||||
@ -131,8 +132,8 @@ CAS_FEDERATE = False
|
|||||||
#: Time after witch the cookie use for “remember my identity provider” expire (one week).
|
#: Time after witch the cookie use for “remember my identity provider” expire (one week).
|
||||||
CAS_FEDERATE_REMEMBER_TIMEOUT = 604800
|
CAS_FEDERATE_REMEMBER_TIMEOUT = 604800
|
||||||
|
|
||||||
|
current_global = globals().copy()
|
||||||
for name, default_value in globals().items():
|
for name, default_value in current_global.items():
|
||||||
# get the current setting value, falling back to default_value
|
# get the current setting value, falling back to default_value
|
||||||
value = getattr(settings, name, default_value)
|
value = getattr(settings, name, default_value)
|
||||||
# set the setting value to its value if defined, ellse to the default_value.
|
# set the setting value to its value if defined, ellse to the default_value.
|
||||||
|
Loading…
Reference in New Issue
Block a user