Marcin Kuzminski committed 7109d15

cleared prints leftoovers, and changed current user fetching in login controller

  • Participants
  • Parent commits 3d1dd13

Comments (0)

Files changed (3)

File pylons_app/controllers/

 class LoginController(BaseController):
     def index(self):
-        if session.get('hg_app_user', AuthUser()).is_authenticated:
+        #redirect if already logged in
+        if c.hg_app_user.is_authenticated:
             return redirect(url('hg_home'))
         if request.POST:

File pylons_app/model/

         except (NoResultFound, MultipleResultsFound, OperationalError) as e:
             user = None
-        print value
         if user:
                 if user.username == username and user.password == crypted_passwd:

File pylons_app/model/

 import os
 from pylons import tmpl_context as c, app_globals as g, session, request, config
 from pylons.controllers.util import abort
+import sys
     from vcs.backends.hg import get_repositories, MercurialRepository
 except ImportError:
-    print 'You have to import vcs module'
+    sys.stderr.write('You have to import vcs module')
     raise Exception('Unable to import vcs')
 class HgModel(object):