comparison rhodecode/controllers/login.py @ 861:fd2ea6ceadc8 beta

updated docs on every controller
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 18 Dec 2010 16:55:28 +0100
parents 56c2850a5b5f
children 07a6e8c65526 a3b2b4b4e440
comparison
equal deleted inserted replaced
860:5f7731e3ab4d 861:fd2ea6ceadc8
1 #!/usr/bin/env python 1 # -*- coding: utf-8 -*-
2 # encoding: utf-8 2 """
3 # login controller for pylons 3 rhodecode.controllers.login
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> 4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 # 5
6 Login controller for rhodeocode
7
8 :created_on: Apr 22, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 # This program is free software; you can redistribute it and/or 13 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License 14 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; version 2 15 # as published by the Free Software Foundation; version 2
9 # of the License or (at your opinion) any later version of the license. 16 # of the License or (at your opinion) any later version of the license.
10 # 17 #
16 # You should have received a copy of the GNU General Public License 23 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software 24 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 # MA 02110-1301, USA. 26 # MA 02110-1301, USA.
20 27
21 """ 28 import logging
22 Created on April 22, 2010 29 import formencode
23 login controller for pylons 30
24 @author: marcink
25 """
26 from formencode import htmlfill 31 from formencode import htmlfill
32
33 from pylons.i18n.translation import _
34 from pylons.controllers.util import abort, redirect
27 from pylons import request, response, session, tmpl_context as c, url 35 from pylons import request, response, session, tmpl_context as c, url
28 from pylons.controllers.util import abort, redirect 36
37 import rhodecode.lib.helpers as h
29 from rhodecode.lib.auth import AuthUser, HasPermissionAnyDecorator 38 from rhodecode.lib.auth import AuthUser, HasPermissionAnyDecorator
30 from rhodecode.lib.base import BaseController, render 39 from rhodecode.lib.base import BaseController, render
31 import rhodecode.lib.helpers as h
32 from pylons.i18n.translation import _
33 from rhodecode.model.forms import LoginForm, RegisterForm, PasswordResetForm 40 from rhodecode.model.forms import LoginForm, RegisterForm, PasswordResetForm
34 from rhodecode.model.user import UserModel 41 from rhodecode.model.user import UserModel
35 import formencode 42
36 import logging
37 43
38 log = logging.getLogger(__name__) 44 log = logging.getLogger(__name__)
39 45
40 class LoginController(BaseController): 46 class LoginController(BaseController):
41 47