How to assign python variable to Javascript variable in web2py

You might be using following statement to assign python variable to javascript variable on older versions of web2py (<2.9.11), may be because of this question on stackoverflow: http://stackoverflow.com/questions/31216574/how-to-pass-data-from-python-to-javascript-in-web2py var javascript_array = {{=XML(response.json(array))}} 1 var javascript_array =  {{=XML(response.json(array))}} Above statement was working… Read the rest

How to change admin app url in web2py?

This question was asked here How to rename “/admin” to other URL in web2py? For all the web2py applications, web2py admin url is same, i. e. www.example.com/admin or 127.0.0.1:8000/admin. One should prevent access to admin interface  to public or… Read the rest

How to write custom download controller in web2py?

Suppose we have employee table with resume as uplaod field. And we want to download file on the basis of employee id. Download  url is like app_name/custom_download/employee_id or <a href="{{=URL('default', 'custom_download', args = employee_id)}}" download> example: www.example.com/default/custom_download/1 Consider following employee… Read the rest