Mercurial > kallithea
diff rhodecode/model/db.py @ 1292:c0335c1dee36 beta
added some fixes to LDAP form re-submition, new simples ldap-settings getter.
Updated docs for new ldap fixes. Removed depracated settings model, in exchange for db model classmethods.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 27 Apr 2011 01:19:17 +0200 |
parents | cb216757a62d |
children | 7e75af301842 |
line wrap: on
line diff
--- a/rhodecode/model/db.py Tue Apr 26 20:28:46 2011 +0200 +++ b/rhodecode/model/db.py Wed Apr 27 01:19:17 2011 +0200 @@ -65,6 +65,11 @@ @classmethod + def get_by_name(cls, ldap_key): + return Session.query(cls)\ + .filter(cls.app_settings_name == ldap_key).scalar() + + @classmethod def get_app_settings(cls, cache=False): ret = Session.query(cls) @@ -88,7 +93,7 @@ .all() fd = {} for row in ret: - fd.update({row.app_settings_name:str2bool(row.app_settings_value)}) + fd.update({row.app_settings_name:row.app_settings_value}) return fd