X-Git-Url: http://git.veekun.com/zzz-spline-users.git/blobdiff_plain/4aafbf548ba21c9b8d8d0d7486b428195a4a87ce..563477a59e282678a232bd4cf151736c92c0e238:/splinext/users/controllers/accounts.py diff --git a/splinext/users/controllers/accounts.py b/splinext/users/controllers/accounts.py index 9add733..a4c1b71 100644 --- a/splinext/users/controllers/accounts.py +++ b/splinext/users/controllers/accounts.py @@ -9,10 +9,10 @@ from pylons import config, request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect_to from routes import request_config -from spline import model from spline.model import meta from spline.lib import helpers as h from spline.lib.base import BaseController, render +from splinext.users import model as users_model log = logging.getLogger(__name__) @@ -74,8 +74,8 @@ class AccountsController(BaseController): try: # Grab an existing user record, if one exists - q = meta.Session.query(model.User) \ - .filter(model.User.openids.any(openid=res.identity_url)) + q = meta.Session.query(users_model.User) \ + .filter(users_model.User.openids.any(openid=res.identity_url)) user = q.one() except NoResultFound: # Try to pull a name out of the SReg response @@ -87,10 +87,10 @@ class AccountsController(BaseController): username = 'Anonymous' # Create db records - user = model.User(name=username) + user = users_model.User(name=username) meta.Session.add(user) - openid = model.OpenID(openid=res.identity_url) + openid = users_model.OpenID(openid=res.identity_url) user.openids.append(openid) meta.Session.commit()