[web2py] Re: Issue with web2py load component

2017-01-13 Thread Gaurav Vichare
Thank You so much Anthony, It worked :) - Gaurav On Saturday, January 14, 2017 at 2:42:27 AM UTC+5:30, Anthony wrote: > > I consider this a router bug. The problem is that the list of functions > must include the function.extension combination in cases where URLs might > include extensions.

Re: [web2py] Re: FPDF

2017-01-13 Thread Áureo Dias Neto
I want to concatenate two functions, thats all one, return a pdf.. and i want to show this 2 pages only in one 2017-01-13 23:02 GMT-02:00 Áureo Dias Neto : > this is my all code of first page > i want another page, totally different of this, in the same pdf > > def

Re: [web2py] Re: FPDF

2017-01-13 Thread Áureo Dias Neto
this is my all code of first page i want another page, totally different of this, in the same pdf def ticketliberacao(): from gluon.contrib.pyfpdf import FPDF, HTMLMixin by_cdc_search = db(db.veiculos.CDC==request.args(0)).select(db.veiculos.ALL).first() if by_cdc_search.FlagSaida!=True:

[web2py] Re: Issue with web2py load component

2017-01-13 Thread Anthony
I consider this a router bug. The problem is that the list of functions must include the function.extension combination in cases where URLs might include extensions. So, in the router, change: functions = ['index', 'user', 'download', 'call', 'test_load'] to: functions =

Re: [web2py] Re: Order of form.vars not same as they appear in form

2017-01-13 Thread Rahul Priyadarsi
Yes form.fields works! Thank you very much On 13 January 2017 at 01:12, Anthony wrote: > form.vars is a dict-like object, so not guaranteed to return keys in any > particular order. If the form is based on a db table, you can iterate > through db.table._fields. The form

[web2py] Re: Call functions from other applications without network requests

2017-01-13 Thread Anthony
> You can use the DAL from modules as well. As Niphlod suggested, you can >> also use the scheduler to schedule and run a task in the context of another >> app, though that might not be as fast as you'd like, as even setting >> immediate=True, it could take up to "heartbeat" seconds for the

[web2py] Re: Issue with web2py load component

2017-01-13 Thread Anthony
Please attach a minimal app that reproduces the problem (along with routes.py). On Thursday, January 12, 2017 at 12:35:41 PM UTC-5, Gaurav Vichare wrote: > > I have LOAD component in my application. I made changes in > web2py/routes.py file and made my application default application, >

[web2py] Re: Issue with web2py load component

2017-01-13 Thread Gaurav Vichare
There is no {{extend 'index.html'}} in test_load.load. I faced similar issue once, when I added {{extend 'layout.html'}} inside load view. But this time, I have {{extend 'layout.html'}} only in index.html Thanks for the reply! On Friday, January 13, 2017 at 6:54:53 PM UTC+5:30, Leonel

[web2py] Re: Issue with web2py load component

2017-01-13 Thread Leonel Câmara
Are you sure test_load.load doesn't have an {{extend 'index.html'}} there? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message

[web2py] Re: Are executesql parameters escaped?

2017-01-13 Thread Jorrit
Thank you! On Friday, January 13, 2017 at 8:59:35 AM UTC+1, Niphlod wrote: > > when you do that, you're passing 'string'.format() (which is a string) to > executesql. > > the proper way is to use parameters!!! > > db.executesql('select * from auth_user where id = ?', placeholders=(1, ), >

[web2py] Re: How to manually construct IS_IN_DB for FK with foreign_table _format?

2017-01-13 Thread Jurgis Pralgauskis
SOLVED: sf.requires = IS_IN_DB( db(query), db.*other_*table.*_id* , label=other_table._format, left=left, distinct=True ) instead of sf.requires = IS_IN_DB( db(query), db.table.*other_id* , label=other_table._format, left=left, distinct=True ) :) On Friday, January 13, 2017 at 11:13:10 AM

[web2py] Customising Calendar widgets in Start Date and End date of SmartGrid

2017-01-13 Thread Amit Kumar Modak
Hello, I am using Smartgrid in which there are two date fields Start Date and End Date. Is it possible to make in Start Date field Calendar widget only dates ahead of today enabled and in End Date only dates ahead of date selected in Start Date is enabled. Regards, Amit -- Resources: -

[web2py] How to manually construct IS_IN_DB for FK with foreign_table _format?

2017-01-13 Thread Jurgis Pralgauskis
Hi, I have query to get subset of stuff (and I want to have the same nice options widget as is for default foreign keys) sf.requires = IS_IN_DB( db(query), db.table.other_id , label=other_table._format, left=left, distinct=True ) but I get form = SQLFORM.factory( *updatables,

[web2py] Re: Are executesql parameters escaped?

2017-01-13 Thread Niphlod
when you do that, you're passing 'string'.format() (which is a string) to executesql. the proper way is to use parameters!!! db.executesql('select * from auth_user where id = ?', placeholders=(1, ), as_dict=True) the nitty gritty details of the syntax depend on the driver parameter On