##// END OF EJS Templates
cleared prints leftoovers, and changed current user fetching in login controller
marcink -
r195:7109d15c default
parent child Browse files
Show More
@@ -12,7 +12,8 b' log = logging.getLogger(__name__)'
12 12 class LoginController(BaseController):
13 13
14 14 def index(self):
15 if session.get('hg_app_user', AuthUser()).is_authenticated:
15 #redirect if already logged in
16 if c.hg_app_user.is_authenticated:
16 17 return redirect(url('hg_home'))
17 18
18 19 if request.POST:
@@ -69,7 +69,6 b' class ValidAuth(formencode.validators.Fa'
69 69 except (NoResultFound, MultipleResultsFound, OperationalError) as e:
70 70 log.error(e)
71 71 user = None
72 print value
73 72 if user:
74 73 if user.active:
75 74 if user.username == username and user.password == crypted_passwd:
@@ -12,10 +12,11 b' Created on Apr 9, 2010'
12 12 import os
13 13 from pylons import tmpl_context as c, app_globals as g, session, request, config
14 14 from pylons.controllers.util import abort
15 import sys
15 16 try:
16 17 from vcs.backends.hg import get_repositories, MercurialRepository
17 18 except ImportError:
18 print 'You have to import vcs module'
19 sys.stderr.write('You have to import vcs module')
19 20 raise Exception('Unable to import vcs')
20 21
21 22 class HgModel(object):
General Comments 0
You need to be logged in to leave comments. Login now