[web2py] Re: How to dynamicly add SQLFORM.grid using JQuery

2018-01-16 Thread Anthony
On Tuesday, January 16, 2018 at 12:08:59 PM UTC-5, Tu Duong wrote: > > Thanks > > 1. *"you can instead put the grid HTML inside a Javascript template > literal"* > You mean like this? > > jQuery('#btn_list_program').click(function(){ jQuery('#selected_form'). > html( *`*{{=list_program}}*`* )

[web2py] Re: Where is password reset link handled?

2018-01-16 Thread Anthony
An instance of Auth is callable, so to understand the /default/user function, take a look at the __call__ method of Auth -- in particular, check out https://github.com/web2py/web2py/blob/623f3b99477eb97ffadb20d6f7cb3da398253c9c/gluon/tools.py#L1916. When the /default/user function calls

[web2py] Where is password reset link handled?

2018-01-16 Thread Ian W. Scott
I'm trying to debug an "invalid reset password" message when a user tries to reset their password via an emailed link. I'm confused, though, about where the emailed link is handled. I understand that it goes to default/user/reset_password, but where in gluon (tools.py?) is that response

Re: [web2py] Re: restapi for login

2018-01-16 Thread yogeshwar khalkar
Thanks Anthony I have done this. @request.restful() def login(): def POST(username, password): user = auth.login_bare(username, password) return json(user) return locals() Its working fine for me. But, am I doing it rigth. On Mon, Jan 15, 2018 at 9:55 PM, Anthony

[web2py] comparison between foreign key id and name

2018-01-16 Thread yogeshwar khalkar
Hi, Please help me with following. I have created the api I am passing company_name(string) to it, for select I am comparing reference Id to name. I get the error invalid literal for long() with base 10: 'cadence' at db.company_user.company == company_name I actually don't know how to

[web2py] Re: How to dynamicly add SQLFORM.grid using JQuery

2018-01-16 Thread Tu Duong
Thanks. The jQuery('#hidden_div_1').html() approach works. *"Also, rather than building all the grids when the page is first requested, you might consider loading each grid asynchronously via Ajax only when needed. For example, clicking a button could call $.web2py.component() to retrieve a

[web2py] Re: How to dynamicly add SQLFORM.grid using JQuery

2018-01-16 Thread Anthony
On Tuesday, January 16, 2018 at 1:01:54 AM UTC-5, Tu Duong wrote: > > I have more than 1 grid on the same page (about 10). I could do it, but it > is not a best solution because I need to keep track of which gird is > visible, hide that grid, and show the new selected one. I hope there is a >

[web2py] Re: comparison between foreign key id and name

2018-01-16 Thread Anthony
DAL reference fields store the record ID of the linked record, not the value of one of its other fields. So, you comparison must be to the record ID of the company, not the company name. Anthony On Tuesday, January 16, 2018 at 4:55:13 AM UTC-5, yogeshwar khalkar wrote: > > Hi, > Please help me

Re: [web2py] Re: restapi for login

2018-01-16 Thread Anthony
On Tuesday, January 16, 2018 at 3:55:30 AM UTC-5, yogeshwar khalkar wrote: > > Thanks Anthony > I have done this. > > @request.restful() > def login(): > def POST(username, password): > user = auth.login_bare(username, password) > return json(user) > return locals() > > >

Re: [web2py] Re: uploadfolder outside web2py

2018-01-16 Thread Richard Vézina
You can also mount the directory you want you file in into web2py folder with bindfs... Or saying it differently mount a directory to another location... https://bindfs.org/ But I think it would be only working with linux. Good luck Richard On Mon, Jan 15, 2018 at 11:22 AM, Anthony

[web2py] Re: How to dynamicly add SQLFORM.grid using JQuery

2018-01-16 Thread Dave S
On Tuesday, January 16, 2018 at 9:08:59 AM UTC-8, Tu Duong wrote: > > [...] > 3.* "Also, rather than building all the grids when the page is first > requested, you might consider loading each grid asynchronously via Ajax > only when needed. For example, clicking a button could call >