[web2py] Re: what are the12 core objects

2014-07-02 Thread 'tomt' via web2py-users
- thanks for the response -- 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 because you are subscribed to the Google Groups "web2

[web2py] Re: bootstrap readonly

2014-07-02 Thread Anthony
You can do: INPUT(..., _readonly=True) which will produce: which I believe should work in most browsers. Anthony On Wednesday, July 2, 2014 2:46:18 PM UTC-4, Annet wrote: > > Bootstrap has the following option to render a field read only: > > readonly> > > Is ther a way to add readonly to i

Re: [web2py] bootstrap readonly

2014-07-02 Thread Marco Mansilla
El Wed, 2 Jul 2014 11:46:18 -0700 (PDT) Annet escribió: > Bootstrap has the following option to render a field read only: > > > > Is ther a way to add readonly to input? > > > Regards, > > Annet > > Have you tried: db.my_table.my_field.writable=False or: setting with jquery $("#f

[web2py] bootstrap readonly

2014-07-02 Thread Annet
Bootstrap has the following option to render a field read only: Is ther a way to add readonly to input? Regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (

[web2py] Re: How to pass an array from jQuery to controller

2014-07-02 Thread Noel Villamor
Nice one Chris and thanks for reviewing this post. Web2py has indeed come a long way from 2 years ago and is worthy of a revisit. Cheers! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/

Re: [web2py] How to pass an array from jQuery to controller

2014-07-02 Thread Chris
Eval can be used to crash a Python app or hack into it, so *please don't use it*, as tempting as it may be!! (http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html) I spent some time working on this and found that something like this is a decent way to do it: //

[web2py] Re: for i,row in enumerate(rows) second condition

2014-07-02 Thread Annet
Hi Simone, Wouldn't all this brain-hurting nested loops with inclusion within the view > be infinitely easier if you could just have THE correct structure BEFORE > fiddling with HTML ? > That's what I thought, hence my question in the workgroup. Thanks for answering it, your solution is useful

[web2py] Re: create an update page (similar to profile page in default application)

2014-07-02 Thread Massimo Di Pierro
The problem is that here: testform = SQLFORM(db.products,db(db.products.product_id==request.post_vars.pid).select(), fields=['product_id','price','pro_type','tags','category','description'])) the result of a select is a Rows and not a Row. Do you know there is a single matching record? In this

Re: [web2py] create an update page (similar to profile page in default application)

2014-07-02 Thread Fabiano Almeida
Need convert request to int: int(request.post_vars.pid) Fabiano. 2014-07-02 8:05 GMT-03:00 Shubham Jain : > I want to create an update page just like profile page in default > application. Actually I am passing the primary key of a table by a button > click to the product_update page. In the co

[web2py] Re: Does python IN operator works for DAL?

2014-07-02 Thread Massimo Di Pierro
No. But you can do: recs = db(m.mt_account==184901310)(*m.name [:2].contains(['cr','bu','se'])*)(m.writetime >lastupdate)( m.name[-4:]=='LOTs').select( m.mt_account,m.name,'ROUND(SUM(m.searchvalue),2)',m.writetime,groupby=m.name [2:8]) On Wednesday, 2 July 2014 01:31:28 UTC-5, Ph

[web2py] Re: with_alias unexpectedly converts field type to string

2014-07-02 Thread Pham Quang Dung
Thanks Massimo, Yes I changed the field type so I know why now. On Monday, June 30, 2014 11:44:28 AM UTC+7, Pham Quang Dung wrote: > > Can anyone explain to me what I did wrongly to have the unexpected string > "test" field, instead of double? > > >>> x=db().select(tb.searchvalue.with_alias('test

[web2py] Re: Error : unable to open database file

2014-07-02 Thread Sandeep Kumar
I checked for the multiple instances of web2py. There are 10 main processes running which should be actually scheduler workers.. i changed those to scheduler workers again with -K option. It seems the app is working fine. Thank you for your solution.. On Friday, 27 June 2014 12:33:38 UTC+5:30,

[web2py] Does python IN operator works for DAL?

2014-07-02 Thread Pham Quang Dung
Hi, Below are the DAL query and its SQLite version, the bold expression was always 1 (true) which made me think its not working? recs = db(m.mt_account==184901310)(*m.name[:2] in ['cr','bu','se']*)(m.writetime >lastupdate)(m.name[-4:]=='LOTs').select( m.mt_account,m.name,'ROUND(SUM(m.searchvalu

[web2py] create an update page (similar to profile page in default application)

2014-07-02 Thread Shubham Jain
I want to create an update page just like profile page in default application. Actually I am passing the primary key of a table by a button click to the product_update page. In the controller of the update page I tried these 2 codes. def product_edit(): db.products.product_id.writable=FALSE

[web2py] Re: Create a database table on submission of a form

2014-07-02 Thread Shubham Jain
Thank you Massimo and Manuele.. -- 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 because you are subscribed to the Google Groups

[web2py] Re: question about onvalidation function

2014-07-02 Thread overstandnigeria
Thanks Massimo , i have used this code and its works fine , On Friday, December 23, 2011 10:13:04 PM UTC+1, Massimo Di Pierro wrote: > > onvalidation = my_form_processing > > registers a callback (called after validation and before accepting). > This does not work > > def my_form_processing(ta

[web2py] Re: {{=XML(row.contents, sanitize=True)}} and

2014-07-02 Thread Cliff Kachinske
You can tune the tags and attributes that XML will allow. XML has a parameter called "permitted_tags." It is a list of tags that XML will not escape. You could, at the top of your controller, create your own list of permitted tags. Then call XML like this: XML(row.contents, sanitize=True, pe

[web2py] {{=XML(row.contents, sanitize=True)}} and

2014-07-02 Thread Annet
In a view I have the following line: {{=XML(row.contents, sanitize=True)}} When 'contents' contains an element add by tinymce, this element isn't being rendered: My text Other elements like are being rendered correctly, is there a way to solve this issue. Regards, Annet -- Resour

[web2py] Re: Silent dal failure with missing field def. Maybe a bug?

2014-07-02 Thread Cliff Kachinske
Thank you. On Tuesday, July 1, 2014 6:16:18 PM UTC-4, Anthony wrote: > > That particular method of updating calls: > > .update(**self._filter_fields(value)) > > So no exception is raised because the fields are filtered to include only > those in the table definition. If you want to catch such err

Re: [web2py] Any one intergrated Indian Payment Systems with web2py app?

2014-07-02 Thread Kiran Subbaraman
Sarbjit, Unfortunately, can't share the integration code, because PayU does not make the integration details public. But it is rather a straight forward piece of code - you include transaction details, a merchant id, a transaction id, and some form a hash in a HTTPS POST to one of their APIs.