[web2py] SQLFORM.grid extra button

2014-12-02 Thread Yebach
Hello I have a SQLFORM.grid and beside the default buttons (edit,view, delete,...) I would like to add a new one to change a status in my database table. Any suggestions? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (

[web2py] Re: long running rpc call

2014-12-02 Thread Leonel Câmara
I'm not sure what you're trying to do, what will associating the httpclient to the thread current gain you? If you don't want to use the scheduler you can call json rpc on the client using javascript, that may be good enough. -- Resources: - http://web2py.com - http://web2py.com/book (Document

[web2py] Re: SQLFORM.grid extra button

2014-12-02 Thread Niphlod
http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid use links On Tuesday, December 2, 2014 9:02:15 AM UTC+1, Yebach wrote: > > Hello > > I have a SQLFORM.grid and beside the default buttons (edit,view, > delete,...) I would like to add a new one to change a statu

[web2py] Re: Rendering null values in SQLFORM.grid

2014-12-02 Thread Yebach
Since I have time and integer fields I cannot set default to ''. What do you suggest for a solution? On Monday, June 10, 2013 5:32:33 PM UTC+2, Niphlod wrote: > > The second one you said (i.e. altering the default repr for None values). > From a "theoretical" standpoint, a null value is not an

[web2py] Unable to upload TIFF image files.

2014-12-02 Thread Prasad Muley
Hi All, I am trying to upload images for "company" table as below: *models/db.py* db.define_table('company', Field('name', 'text', notnull=True), Field('abbrev', 'string', length=32), Field('logo', 'upload', upload

Re: [web2py] Re: SQLFORM.grid extra button

2014-12-02 Thread Vid Ogris
I need to add button to every row. So besides edit, view,delete, etc I can call another function 2014-12-02 9:56 GMT+01:00 Niphlod : > > http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid > use links > > > On Tuesday, December 2, 2014 9:02:15 AM UTC+1, Yebach wrot

[web2py] Re: Dynamic Upload Uploadfolder

2014-12-02 Thread Leonel Câmara
There are lots of ways to do this, the easiest is probably to just define the uploadfolder for the field in the controller for workbench creation/update instead of defining your custom store and retrieve. Something like this: def create_workbench(): """ Form to create a workbench in a give

Re: [web2py] Unable to upload TIFF image files.

2014-12-02 Thread Kiran Subbaraman
According to the code comments: "Supported file formats: BMP, GIF, JPEG, PNG." Take a look at the code here: https://github.com/web2py/web2py/blob/7c8d91d4c57bd68c2b70f877eaa8da2b6a99b23b/gluon/validators.py#L3140 Kiran Subbaraman http://subbaraman.wordp

Re: [web2py] Re: SQLFORM.grid extra button

2014-12-02 Thread Niphlod
again. check the *links* argument On Tuesday, December 2, 2014 10:19:46 AM UTC+1, Yebach wrote: > > I need to add button to every row. So besides edit, view,delete, etc I can > call another function > > 2014-12-02 9:56 GMT+01:00 Niphlod >: > >> >> http://web2py.com/books/default/chapter/29/07/for

[web2py] Re: Rendering null values in SQLFORM.grid

2014-12-02 Thread Niphlod
why not ? the point here is representing something that isn't there as "something else (entirely your choice)" instead of "None". The solution IF THE APP DOESN'T CARE is to set a default. IF THE APP CARES you still have the represent solution, where you can use "whatever you want, we've got it"

Re: [web2py] Re: Subclassing IS_IN_SET - one piece missing.

2014-12-02 Thread Andrew Buchan
That works perfectly, thanks Niphlod! On Mon, Dec 1, 2014 at 8:54 PM, Niphlod wrote: > why reinventing the wheel ? IS_IN_DB takes a Set... > > gr = db.auth_group > me = db.auth_membership > us = db.auth_user > > theset = db( >(us.id == me.user_id) & >(gr.id == me.group_id) & >(gr.rol

[web2py] Re: python in javascript extension file (*.js)

2014-12-02 Thread Yebach
Is it possible to include {{=T()}} in my static js file?? Smth like $('.multiselectDays').multiselect({ numberDisplayed: 5, nonSelectedText: 'Izberite dneve', // {{=T('Select days')}} includeSelectAllOption: true, selectAllText: 'Izberi vse' //{{=T('Select all')}} }); I need it for translati

[web2py] Re: python in javascript extension file (*.js)

2014-12-02 Thread Anthony
You can dynamically create and serve a JS file just like an HTML file, but you cannot do so by putting the JS in the /static folder (unless using routing to rewrite the URL to point to a web2py controller). Static files are served directly without going through the full framework request cycle,

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2014-12-02 Thread Remco Boerma
What solved my issue was registering with copy_reg. I store an instance of my own class in the session, which now brakes without a registered reduction function. Though the class implements __getstate__ and __setstate__ apparently that isn't enough anymore. For docs checkout https://docs.pyt

[web2py] Re: SQLForm.grid ondelete callback is not called from update form

2014-12-02 Thread Anthony
> > it calls ondelete callback in the grid view after pressing the delete > button, > when using update form (setting delete checkbox to true), while normally > calling it after pressing the delete button in the grid view. > I don't quite understand the above sentence. Can you explain exactly w

Re: [web2py] Like the 1st example in the web2py book, can I customize my session.counter to count all sessions?

2014-12-02 Thread Richard Vézina
Make a counter table with a column count and update the first row of the table each time there is an unique IP address every day... Or you can implement other rule... In your footer you will display the count db.counter(1).count # You select row 1 content that is you count You update your coun

[web2py] Re: Dynamic Upload Uploadfolder

2014-12-02 Thread James Burke
Thank you Leonel, great idea. Although I'll need to use oncreate/onupdate since I'm using a smartgrid Cheers, -James On Tuesday, December 2, 2014 10:28:49 PM UTC+13, Leonel Câmara wrote: > > There are lots of ways to do this, the easiest is probably to just define > the uploadfolder for the fi

[web2py] Re: update_or_insert error

2014-12-02 Thread Nico de Groot
The function _update_or_insert(... returns the sql that is generated. -- 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 yo

[web2py] Re: Java Client for web2py SOAP web service

2014-12-02 Thread Pengfei Yu
Cool! Thanks very much for sharing, Dave! On Tuesday, November 25, 2014 2:26:47 PM UTC-5, Dave S wrote: > > > > On Monday, November 24, 2014 12:24:25 PM UTC-8, Pengfei Yu wrote: >> >> Hi Dave, >> >> Thanks very much for your reply! Could you give a more detailed example >> for an implementation

[web2py] Write Inline query

2014-12-02 Thread vijay . rajbhar
Hi All, I really need help with a query? this is my query: Select * from Table1 where Column1 not in (Select Column2 from Table2); How to write Query in Web2py DAL Sql From Grid -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou

[web2py] Re: Custom validator - pass record id to validator for update operations

2014-12-02 Thread clara
Hello Andrew, It does make sense! I was actually passing one of the record fields to my validator instead of the record ID I could just have passed the id and then have access to any field in the record. Thanks a lot ! Clara El lunes, 1 de diciembre de 2014 12:20:11 UTC-3, Andrew Buchan

[web2py] Not in touch with web2py community for a while. anything new interesting?

2014-12-02 Thread Phyo Arkar
Being busy and i lost touch with w2p community for a while. What are the new features of web2py? What are the most actively maintainted web2py community projects ? (Plug-ins?, CMS ? , Blogs?) We are planning to build a community platform , with some blog features and comment system. So , is the

[web2py] Re: Java Client for web2py SOAP web service

2014-12-02 Thread Dave S
On Tuesday, December 2, 2014 6:45:04 AM UTC-8, Pengfei Yu wrote: > > Cool! Thanks very much for sharing, Dave! > My pay-forward. Glad it helped. /dps > > On Tuesday, November 25, 2014 2:26:47 PM UTC-5, Dave S wrote: >> >> >> >> On Monday, November 24, 2014 12:24:25 PM UTC-8, Pengfei Yu wrot

[web2py] Re: Not in touch with web2py community for a while. anything new interesting?

2014-12-02 Thread Derek
Hmm, what's changed in the last two years? It looks like the community has grown a lot, we have CI with travis, more compatibility with pypy and ironpython... better sql server support. geolocation integration, authentication plugins, modular architecture, lazy tables... what else? On Tuesday,

[web2py] Re: Not in touch with web2py community for a while. anything new interesting?

2014-12-02 Thread Derek
>What are the most actively maintainted web2py community projects ? (Plug-ins?, CMS ? , Blogs?) Regarding the 'most actively maintained community projects' I don't really see much of that. Most projects that I see are usually a one man project that is thrown up on the web when done and not re

Re: [web2py] Hardcoded Drop Down Menu In Form

2014-12-02 Thread Pablo Cruise
Thanks Johann. I need to take some time and fully read and analyze the Web2py book. I'll try SQLFORM on a future form. On Tue, Nov 25, 2014 at 10:26 PM, Johann Spies wrote: > On 26 November 2014 at 01:47, Pablo Cruise wrote: > >> I'm a novice Web2py programmer and I've searched the net but can

Re: [web2py] Re: Hardcoded Drop Down Menu In Form

2014-12-02 Thread Pablo Cruise
Thanks TR. That worked great! On Wed, Nov 26, 2014 at 1:08 AM, T.R.Rajkumar wrote: > Its not INPUT. Its SELECT. See the code below. > def get_shifts(): > return ["1","2","3","G"] > > > shifts = get_shifts() > > form = FORM(TABLE( > TR('AgtNo:',SELECT(_name='cmbAgtNo',_

[web2py] Re: update_or_insert error

2014-12-02 Thread Niphlod
On Tuesday, December 2, 2014 6:19:23 PM UTC+1, Nico de Groot wrote: > > The function _update_or_insert(... returns the sql that is generated. @nico: unfortunately there isn't (it's a two-step phase that isn't resolved to a single SQL statement) however, it made me spot the actual error in th

Re: [web2py] Form input show decimal fields with 4 decimals? (How to format input field in forms?)

2014-12-02 Thread Richard Vézina
Hello Tom, The validator don't determine the number of places you want base on your decimal field definition, you have to specified it in the validator : IS_DECIMAL_IN_RANGE(0., ., dot=',') Notice you have only 2 places in your decimal definition field model!! Richard On Sat, No

Re: [web2py] Re: Web2py's included connection pooling VS external pooling software

2014-12-02 Thread Michele Comitini
Everything ok with your plan. One note, instead of playing with the max-procs in lighttpd you can use the fastcgi server parameters. btw don't use flup use this: https://github.com/momyc/gevent-fastcgi and arrange the num_workers parameter. to do that differently for each application may end up wi

[web2py] Re: web2py doesn't retrieve the latest user-memberships from ldap.

2014-12-02 Thread Derek
That seems normal to me. Maybe you'd want to set the session timeout to 1 day. On Monday, December 1, 2014 3:23:56 AM UTC-7, Dennis Jacobs wrote: > > Hi Guys, > > I've a small question regarding the auth-module when using ldap. > I know that when a user doesn't exist in the web2py tables, web2py

[web2py] Re: update_or_insert error

2014-12-02 Thread T.R.Rajkumar
Thanks Niphlod, I did as you said and it is working nicely. Thank you once again for pointing the mistake. -- 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) --