Mercurial > hg > bitsyauth
changeset 6:40fa556252a7
fix playing nice with paste auth
author | k0s <k0scist@gmail.com> |
---|---|
date | Sat, 26 Dec 2009 23:09:19 -0500 |
parents | 2693b81f5960 |
children | 672a4dd85763 |
files | bitsyauth/__init__.py |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/bitsyauth/__init__.py Sat Dec 26 22:56:56 2009 -0500 +++ b/bitsyauth/__init__.py Sat Dec 26 23:09:19 2009 -0500 @@ -121,7 +121,7 @@ multi_auth.set_query_argument('digest', key='auth') # form authentication - template = self.login(wrap=True) + template = self.login(wrap=True, action='%s') multi_auth.add_method('form', form.middleware, self.authfunc, template=template) multi_auth.set_default('form') @@ -186,9 +186,7 @@ ### login def login_form(self, referer=None, action=None): - if action is None: - action = self.urls['login'] - form = Form(action='', submit='Login') + form = Form(action=action or '', submit='Login') form.add_element('textfield', 'Name', input_name='username') form.add_element('password', 'Password', input_name='password') if referer: @@ -200,7 +198,6 @@ referer = None if hasattr(self, 'request'): referer = self.request.referer - form = self.login_form(action=action, referer=referer) join = self.urls.get('join') retval = form(errors)