Bugfix for full CRUD internal read links

14 views
Skip to first unread message

Bernd Rothert

unread,
Jan 28, 2011, 1:33:10 PM1/28/11
to web2py-users
The book's example for "full CRUD"

def data(): return (form=crud())

doesn't set the proper links from

.../data/select/<table> to
.../data/read/<table>/<id>

they instead go to
.../read/<table>/<id>


This patch fixes the issue:

--- a/gluon/tools.py Fri Jan 28 09:54:47 2011 -0600
+++ b/gluon/tools.py Fri Jan 28 19:27:06 2011 +0100
@@ -2668,7 +2668,7 @@
elif args[0] == 'create':
return self.create(args(1))
elif args[0] == 'select':
- return self.select(args(1),linkto=self.url('read'))
+ return self.select(args(1),linkto=self.url(args='read'))
elif args[0] == 'read':
return self.read(args(1), args(2))
elif args[0] == 'update':


Massimo Di Pierro

unread,
Jan 28, 2011, 5:28:11 PM1/28/11
to web2py-users
oops. Thanks

Running Clam

unread,
Jan 29, 2011, 7:53:28 AM1/29/11
to web2py-users
Hi Bernd,

Thank you - I think that solves a problem I've been wrestling with.

--

Clam

Massimo Di Pierro

unread,
Jan 29, 2011, 9:40:05 AM1/29/11
to web2py-users
fixed in trunk now.

On Jan 28, 12:33 pm, Bernd Rothert <roth...@googlemail.com> wrote:
Reply all
Reply to author
Forward
0 new messages