web2py 1.81.1 is OUT

9 views
Skip to first unread message

mdipierro

unread,
Jul 16, 2010, 3:01:34 AM7/16/10
to web2py-users
This is an important release. There are many small but very important
changes:

- Usual bug-fixes.

- New welcome app with better look, superfish menu and jQuery 1.4.2

- Increased security. It means you can place {{=....}} inside tag
attributes without worry about injections. Thanks Craig Youkins

- Last but not least we have incorporate code from Mr Freeze RPX slice
into web2py core.

You now find these lines in welcome/models/db.py

# from gluon.contrib.login_methods.rpx_account import
RPXAccount
#
auth.settings.actions_disabled=['register','change_password','request_reset_password']
# auth.settings.login_form = RPXAccount(request,
api_key='...',domain='...', url = '...')

uncomment them, register (for free) with janrain.com (rpxow.com) and
fill-in api_key, domain, and url (your complete exposed login url).

You can add those 3 lines to any existing app.

They allow your users to login in your web2py app with any of the
janrain supported backends: facebook google, myscape, twitter,
linkedin, etc. They require no hacking, and no additional modules.

It should work on GAE too but I did not try. If you try please report
here.

Please report any issue with 1.81.1

Massimo

David Marko

unread,
Jul 16, 2010, 4:21:24 AM7/16/10
to web2py-users
I updated web2py but it breaks my app. This is what I got for standard
login dialog. (no rpx_account login used, app remained unchanged)

Traceback (most recent call last):
File "c:\java\google_appengine\web2py\gluon\restricted.py", line
178, in restricted
exec ccode in environment
File "c:/java/google_appengine/web2py/applications/tp/controllers/
default.py", line 300, in <module>
File "c:\java\google_appengine\web2py\gluon\globals.py", line 96, in
<lambda>
self._caller = lambda f: f()
File "c:/java/google_appengine/web2py/applications/tp/controllers/
default.py", line 277, in user
return dict(form=auth())
File "c:\java\google_appengine\web2py\gluon\tools.py", line 967, in
__call__
return self.login()
File "c:\java\google_appengine\web2py\gluon\tools.py", line 1404, in
login
cas_user = cas.get_user()
AttributeError: 'Auth' object has no attribute 'get_user'

David Marko

unread,
Jul 16, 2010, 4:44:20 AM7/16/10
to web2py-users
The same problem is on all apps I have.

David

Narendran

unread,
Jul 16, 2010, 9:16:29 AM7/16/10
to web2py-users
On my case, after upgrade, and trying to use rpx, I get this error:
Traceback (most recent call last):
File "/usr/lib/web2py/gluon/restricted.py", line 178, in restricted
exec ccode in environment
File "/usr/lib/web2py/applications/deals/controllers/default.py",
line 156, in <module>
File "/usr/lib/web2py/gluon/globals.py", line 96, in <lambda>
self._caller = lambda f: f()
File "/usr/lib/web2py/applications/deals/controllers/default.py",
line 135, in user
return dict(form=auth())
File "/usr/lib/web2py/gluon/tools.py", line 966, in __call__
if args[0] == 'login':
File "/usr/lib/web2py/gluon/tools.py", line 1393, in login
form.vars[passfield] = None
AttributeError: 'RPXAccount' object has no attribute 'login_url'

Narendran

unread,
Jul 16, 2010, 9:28:52 AM7/16/10
to web2py-users
I guess in rpx_account.py, the __init__ parameter url has to be
changed to login_url to conform with auth in tools.py.

Narendran

unread,
Jul 16, 2010, 9:33:01 AM7/16/10
to web2py-users
Hi,
Yes, that was in fact the issue. On fixing that it works. Now, onto
David's problem :).

mr.freeze

unread,
Jul 16, 2010, 9:34:18 AM7/16/10
to web2py-users
Line 1401 of tools.py needs to be changed (back) from...
if self.settings.login_form:
to...
else:

It didn't affect my test app because it already used CAS.

Narendran

unread,
Jul 16, 2010, 9:48:53 AM7/16/10
to web2py-users
Looks like there is no get_user method in default Auth. I find a
get_or_create_user. May be the name was modified in the recent
checkins.

mr.freeze

unread,
Jul 16, 2010, 9:53:50 AM7/16/10
to web2py-users
You can just change line 1401 of tools.py to 'else:' and it should
work.

VP

unread,
Jul 16, 2010, 11:43:34 AM7/16/10
to web2py-users
well, i should have read this thread before upgrading. Hope to see
1.81.2 soon.

Phyo Arkar

unread,
Jul 16, 2010, 4:39:20 PM7/16/10
to web...@googlegroups.com
same to mee too.. i updated on my production site and screwed :(..

Bruno Rocha

unread,
Jul 16, 2010, 11:22:24 PM7/16/10
to web...@googlegroups.com
I ike the new visual style, just think it should be centralized or fluid.
strings of the README are not all being very well translated into
Portuguese, I can send you the language file for that.

why the administration interface does not have the same new visual
style of "welcome" app?

2010/7/16 Phyo Arkar <phyo.ar...@gmail.com>:

--

http://rochacbruno.com.br

Thadeus Burgess

unread,
Jul 17, 2010, 12:49:30 AM7/17/10
to web...@googlegroups.com
One thing Ive learned. NEVER update your production code to the latest version.

ALWAYS find a stable release, and stick to it until you can test another stable release 100%. Honestly I would stay away from upgrading at all unless you are needing a new feature. Typically new features in web2py don't become *stable* until a few releases later.

I'm currently still running 1.68 codebase (with a couple of the security patches manually applied) on one of my sites, and 1.7* on another.

--
Thadeus

mdipierro

unread,
Jul 17, 2010, 3:17:27 AM7/17/10
to web2py-users
I apologize. I tried to push 1.81.1 just before leaving for
Europython, made a mistake in commit and have been unable to connect
for 20 hours. I am posting 1.81.2 with the bugfix.

SORRY.

Massimo

On 16 Lug, 23:49, Thadeus Burgess <thade...@thadeusb.com> wrote:
> One thing Ive learned. NEVER update your production code to the latest
> version.
>
> ALWAYS find a stable release, and stick to it until you can test another
> stable release 100%. Honestly I would stay away from upgrading at all unless
> you are needing a new feature. Typically new features in web2py don't become
> *stable* until a few releases later.
>
> I'm currently still running 1.68 codebase (with a couple of the security
> patches manually applied) on one of my sites, and 1.7* on another.
>
> --
> Thadeus
>
> On Fri, Jul 16, 2010 at 3:39 PM, Phyo Arkar <phyo.arkarl...@gmail.com>wrote:
>
> > same to mee too.. i updated on my production site and screwed :(..
>
Reply all
Reply to author
Forward
0 new messages