web2py new version

85 views
Skip to first unread message

Maurice Waka

unread,
Mar 14, 2015, 3:36:24 AM3/14/15
to web...@googlegroups.com
I have been using the old version of web2py but when I updated to the latest version, I noted that there are some things that don't work with my new app.
I get errors such as prettydate is not declared', now the view.html page is returning 'None'on my requests.
Can I go back to the old version without problems or I have to redo my code all over.
Regards

Ian Holser

unread,
Mar 14, 2015, 4:11:29 AM3/14/15
to web...@googlegroups.com
You can go back.  I don't know why web2py broke some backwards compatibility.  The changes to dal made me have to import from dal.objects instead.  I think there should be a placeholder for things like dal.Row.
I just tried prettydate and it worked for me with the most recent version.

Niphlod

unread,
Mar 14, 2015, 4:30:09 PM3/14/15
to web...@googlegroups.com
prettydate availability throughout your app comes from this line in a model

from gluon.tools import prettydate

if you upgraded web2py but your app's code remained the same, you should not suffer from it. If instead you overwrote some files on your app with ones coming from the new scaffolding app, that line is no longer there. Just add it back.

Anthony

unread,
Mar 14, 2015, 4:55:43 PM3/14/15
to web...@googlegroups.com
On Saturday, March 14, 2015 at 4:11:29 AM UTC-4, Ian Holser wrote:
You can go back.  I don't know why web2py broke some backwards compatibility.  The changes to dal made me have to import from dal.objects instead.  I think there should be a placeholder for things like dal.Row.

Note, backwards compatibility is only promised for the API, not all internal classes, methods, and implementation details. Anyway, gluon.dal does expose pydal.objects.Row as Row, so you can do from gluon.dal import Row, just as before.

Anthony
Reply all
Reply to author
Forward
0 new messages