[web2py] Support JWT and basic auth for the same API function

2018-10-22 Thread Akash B
Is it possible to support JWT and basic auth on the same API function? It seems like JWT token verification is taking preference and returns even though AuthJWT documentation says token is optional. Some sample code below: *Controller jwt.py:* myjwt = AuthJWT(auth, secret_key = "sometestkey1234

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-03 Thread Akash B
Thanks for the suggestion! I added a header check for the web2py-component-element header. I had to manually add the value to response.headers (from request.cid) because I'm using a call to web2py_component I guess. But it works perfectly!! On Thursday, August 3, 2017 at 6:28:07 PM UTC-7, Anth

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-03 Thread Akash B
Thanks Anthony!! I resolved my problem with an ajaxSuccess event handler. I am calling a web2py_component with the target div and using setTimeout to achieve what I want. The code snippet in demo/f1.html is below for anyone who may be interested: my_url = "{{=URL('demo', 'f1.load')}}"; update_i

[web2py] Re: SQLFORM.grid, pagination and LOAD helper

2017-08-02 Thread Akash B
Thank you for your response. As you suggested, I am currently trying to get around this by manually adding the div layer (instead of LOAD helper) and setting the generated link from the controller using response.js. Snippet below: In demo/f1.html: loading... In controller f1: url =

[web2py] SQLFORM.grid, pagination and LOAD helper

2017-08-02 Thread Akash B
I'm relatively new to the web2py framework and I've been enjoying writing code because of all the features that the framework provides. Here is the issue I've run into: 1. I have a controller named "demo" with a function "f1" that returns an SQLFORM.grid directly from a table. The paginat