Mercurial > kallithea
comparison rhodecode/model/db.py @ 1515:da8f1d1b22de
merge stable with beta
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 07 Oct 2011 02:53:29 +0200 |
parents | bf263968da47 87ec80c280bb |
children | 752b0a7b7679 |
comparison
equal
deleted
inserted
replaced
1513:12946daf44f9 | 1515:da8f1d1b22de |
---|---|
39 from vcs import get_backend | 39 from vcs import get_backend |
40 from vcs.utils.helpers import get_scm | 40 from vcs.utils.helpers import get_scm |
41 from vcs.exceptions import VCSError | 41 from vcs.exceptions import VCSError |
42 from vcs.utils.lazy import LazyProperty | 42 from vcs.utils.lazy import LazyProperty |
43 | 43 |
44 from rhodecode.lib import str2bool, safe_str, get_changeset_safe, \ | |
45 generate_api_key | |
44 from rhodecode.lib.exceptions import UsersGroupsAssignedException | 46 from rhodecode.lib.exceptions import UsersGroupsAssignedException |
45 from rhodecode.lib import str2bool, json, safe_str, get_changeset_safe,\ | 47 from rhodecode.lib.compat import json |
46 generate_api_key | |
47 | 48 |
48 from rhodecode.model.meta import Base, Session | 49 from rhodecode.model.meta import Base, Session |
49 from rhodecode.model.caching_query import FromCache | 50 from rhodecode.model.caching_query import FromCache |
50 | 51 |
51 log = logging.getLogger(__name__) | 52 log = logging.getLogger(__name__) |
300 log.debug('updated user %s lastlogin', self.username) | 301 log.debug('updated user %s lastlogin', self.username) |
301 | 302 |
302 @classmethod | 303 @classmethod |
303 def create(cls, form_data): | 304 def create(cls, form_data): |
304 from rhodecode.lib.auth import get_crypt_password | 305 from rhodecode.lib.auth import get_crypt_password |
305 | 306 |
306 try: | 307 try: |
307 new_user = cls() | 308 new_user = cls() |
308 for k, v in form_data.items(): | 309 for k, v in form_data.items(): |
309 if k == 'password': | 310 if k == 'password': |
310 v = get_crypt_password(v) | 311 v = get_crypt_password(v) |