LOAD Helper ajax True produces only "Loading..." message.

153 views
Skip to first unread message

James Burke

unread,
Nov 23, 2013, 1:07:57 AM11/23/13
to
Hi,

I've just upgraded to the latest release of web2py 2.7.4-stable+timestamp.2013.10.14.15.16.29  . 

Using a modified version of the Manage Users and Members slice found here:

My LOAD helper now only shows "loading..." if ajax=True. Changing it to False produces the grid but when I click on an item I'm taken to another page

My code:

def manage_membership():
 user_id
= request.args(0)
 db
.auth_membership.user_id.default = int(user_id)
 db
.auth_membership.user_id.writable = False
 form
= SQLFORM.grid(db.auth_membership.user_id == user_id,
   args
=[user_id],
   searchable
=False,
   deletable
=False,
   details
=False,
   selectable
=False,
   csv
=False)
 
return form



def list_users():

 users
= SQLFORM.grid(db.auth_user.email != 'm...@gmail.com',
 details
=False,
 csv
=False)

 membership_panel
= None
 
if request.args(0) == 'edit' and request.args(1) == 'auth_user':
   user_id
= request.args(2)
   membership_panel
= LOAD(request.controller,
     
'manage_membership.html',
     args
=[user_id],
     ajax
=True)

 
return dict(users=users, membership_panel=membership_panel)


Is this a bug or is my code buggy?

Cheers,

-James


Anthony

unread,
Nov 23, 2013, 8:32:24 AM11/23/13
to web...@googlegroups.com
When you upgrade, you also have to upgrade the web2py.js file (and possibly the web2py_ajax.html and appadmin files as well). Those files are in the app folder but are part of the framework.

Anthony

James Burke

unread,
Nov 23, 2013, 2:21:06 PM11/23/13
to web...@googlegroups.com
That fixed it, thanks Anthony!
Reply all
Reply to author
Forward
0 new messages