[web2py] Re: Edit form style

2016-01-18 Thread desta
Denes, indeed that is what I was looking for. Thank you very much! On Sunday, January 17, 2016 at 7:03:49 PM UTC+2, DenesL wrote: > > The 3 at the end is calculated in the _inner function of the > formstyle_bootstrap3_inline_factory function in sqlhtml.py (around line 909 > in 2.12.03). > > De

[web2py] Re: Wiki.auth 401 error

2016-01-18 Thread Mirek Zvolský
Now I am sure that this behavior has nothing common with Web2py/wiki code. If you have an application with Sqlite database, please be patient if you play with it and decide recreate it so that you delete the content of database/ folder completly. In such case delete always sessions/ folder too.

[web2py] Re: repository plugin-wiki

2016-01-18 Thread Mirek Zvolský
The reason for problems was undeleted session/ folder after recreating the database/ folder. Basic mistake. :( Dne pátek 15. ledna 2016 11:52:28 UTC+1 Mirek Zvolský napsal(a): > > I'm sorry for this mistake. > I made a small app based on the old plugin and it works for me. > > Of course I want

[web2py] Re: web3py

2016-01-18 Thread Mirek Zvolský
So Python 2.x code is here published with Web3py name. That is not criticism, I just describe the situation. Maybe we would need other name for real Python 3.x version. Something like Web23py (called "Twenty three framework") :) I think the Python 3.x version would be really useful in this time or

[web2py] Re: request.args

2016-01-18 Thread goome
Thank you! It works, but i cannot understnd how and why. Could you explain? How is grid interested in request.args(if i don't use it as such, but copy args[0] in ufie and pass that to grid)? Il giorno lunedì 18 gennaio 2016 02:10:32 UTC+1, Massimo Di Pierro ha scritto: > > should eb > > def vi

[web2py] Re: best advice on customer/client picklist popup.

2016-01-18 Thread Val K
Hi Lucas! I had similar problem and here is my solution: For search I use SQLFORM.grid with buttons (button per row) having data-attributes, for example, in your case attrs may be: data-client_id, data-client_name with corresponding values Then I use LOAD() with ajax_trap=True to embed SQL

Re: [web2py] Re: server function not triggered in some cases

2016-01-18 Thread Yebach
I do not think you can treat it as a never ending process. There is a *.exe program that is started when user sends request, and also user stops it whenever he/she wants. I do not know how to treat this kind of process.I tried with scheduler but there was the same problem I really need some h

Re: [web2py] Re: server function not triggered in some cases

2016-01-18 Thread Niphlod
"neverending" for this sake is "running for more than the usual timeout imposed by webservers" which is 60 seconds. a task can be queued and also stopped via the scheduler APIs (queue_task and stop_task) On Monday, January 18, 2016 at 12:43:36 PM UTC+1, Yebach wrote: > > I do not think you can

[web2py] Re: request.args

2016-01-18 Thread Anthony
On Monday, January 18, 2016 at 4:29:56 AM UTC-5, goome wrote: > > Thank you! > It works, but i cannot understnd how and why. > Could you explain? > How is grid interested in request.args(if i don't use it as such, but copy > args[0] in ufie and pass that to grid)? > The grid creates a number of

[web2py] Re: web3py

2016-01-18 Thread Anthony
> > 2. > good separated (different?) templating characters {{ }} for the server > side and for modern javascript frameworks like vue.js where same is used > Note, you can already set custom delimiters by specifying response.delimiters. Anthony -- Resources: - http://web2py.com - http://web2p

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-01-18 Thread Manuele Pesenti
Il 18/01/16 02:36, Ron Chatterjee ha scritto: > Thank you Massimo, > > It seems that will only work with string. But for an example of file > upload validator, this wouldn't work. Or if I have a DAL validator > like is URL(). In other words... Let's say I want someone to create a > profile of his w

[web2py] sqlform default field and redirect

2016-01-18 Thread Diego Tostes
Hi, i have a sqlform like this: form = SQLFORM.grid(query=query_simulados, user_signature=False, fields=fields, ignore_rw=True, orderby=default_sort_order, create=True, deletable=True, editable=True, maxtextlength=64, paginate=4

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-01-18 Thread Ron Chatterjee
Seem to be some issues. Right? Or may be something I am missing. Field('link', 'list:string', requires=IS_URL()), The above wouldn't work because the validator breaks. If I take off 'list:string' from above field and type a wrong URL (let's say without .com or something), the validator will pr

Re: [web2py] simple update of an cache.ram python dict

2016-01-18 Thread Richard Vézina
The idea of making a function was to be DRY. On one part create the dictionary of ids representation once... Then use the same function to update it where record get created which required that we add a new representation. I could have done what you explain, plain cache.ram() assignation and an upd

[web2py] Re: boolean DAL field giving error under 2.5.1

2016-01-18 Thread lucas
so, if you add update=False to the field definition, shouldn't the unchecked checkbox put in a value of false in the db? because i am still getting errors upon updating. lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-01-18 Thread Manuele Pesenti
Il 18/01/16 16:04, Ron Chatterjee ha scritto: > Field('link', 'list:string', requires=IS_URL()), accordingly to http://web2py.com/books/default/chapter/29/07/forms-and-validators#Special-type-validators it should be: Field('link', 'list:string', requires=IS_LIST_OF(IS_URL())), Cheers M. --

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-01-18 Thread Ron Chatterjee
Got it. Thank you Manuele. I guess we will need to code up the file upload individually. On Monday, January 18, 2016 at 10:25:58 AM UTC-5, Manuele wrote: > > Il 18/01/16 16:04, Ron Chatterjee ha scritto: > > Field('link', 'list:string', requires=IS_URL()), > accordingly to > > http://web2py.

[web2py] Re: sqlform default field and redirect

2016-01-18 Thread Anthony
On Monday, January 18, 2016 at 9:29:29 AM UTC-5, Diego Tostes wrote: > > Hi, > > i have a sqlform like this: > > > form = SQLFORM.grid(query=query_simulados, user_signature=False, > fields=fields, > ignore_rw=True, orderby=default_sort_order, > c

Re: [web2py] Re: sqlform default field and redirect

2016-01-18 Thread Diego Tostes
hi anthony! thnaks... the default field is working!! but the redirect i did no understand... 2016-01-18 14:11 GMT-02:00 Anthony : > On Monday, January 18, 2016 at 9:29:29 AM UTC-5, Diego Tostes wrote: >> >> Hi, >> >> i have a sqlform like this: >> >> >> form = SQLFORM.grid(query=query_si

[web2py] Additional field type for real boolean

2016-01-18 Thread Mike Constabel
Hello, I need to map *a new* boolean field in a real postgresql bolean field. In an old post from 2012 I found this: > I understand the problem. You can chance the DB type (and you did) but > web2py still tries to put an 'F' or a 'T' in there. > > I modified trunk so that this can be achieved

[web2py] Re: multiple instances of a single form on one page

2016-01-18 Thread aetagothno
Something like this: User inputs x amount of days, using jquery I will have buttons of some sort that represent x amount of days which appear when the user specifies x. They will then be able to click each button, where an instance of the form is displayed and they can enter information for tha

Re: [web2py] Re: sqlform default field and redirect

2016-01-18 Thread Anthony
On Monday, January 18, 2016 at 11:22:16 AM UTC-5, Diego Tostes wrote: > > hi anthony! > > thnaks... the default field is working!! > > but the redirect i did no understand... > Something like: callback = lambda *args: redirect(URL('default', 'index')) form = SQLFORM.grid(..., oncreate=callback, o

Re: [web2py] Re: sqlform default field and redirect

2016-01-18 Thread Diego Tostes
thanks! works!! 2016-01-18 14:37 GMT-02:00 Anthony : > On Monday, January 18, 2016 at 11:22:16 AM UTC-5, Diego Tostes wrote: >> >> hi anthony! >> >> thnaks... the default field is working!! >> >> but the redirect i did no understand... >> > > Something like: > > callback = lambda *args: redire

[web2py] Re: Use auto complete without SQL

2016-01-18 Thread 'DenesL' via web2py-users
Hello Seraaj 1) You can still use SQLFORM if you want, just preset the widget and use the fields parameter of SQLFORM to filter: def someaction(): db.table.fieldX.widget = SQLFORM.widgets.autocomplete(request, ...) form = SQLFORM(db.table, fields=['fieldX',], ...) if form.validate(): #

[web2py] Re: multiple instances of a single form on one page

2016-01-18 Thread Anthony
This is a bit complicated. You don't actually want x separate forms, as you need to be able to submit a single form (so you want x copies of the input fields, but all wrapped in a single form). If you do that, though, for each field, you'll get a list of values (one for each copy of the field in

[web2py] Re: request.args

2016-01-18 Thread goome
ah ok, tanks a lot Il giorno lunedì 18 gennaio 2016 14:18:49 UTC+1, Anthony ha scritto: > > On Monday, January 18, 2016 at 4:29:56 AM UTC-5, goome wrote: >> >> Thank you! >> It works, but i cannot understnd how and why. >> Could you explain? >> How is grid interested in request.args(if i don't us

[web2py] Re: Additional field type for real boolean

2016-01-18 Thread Anthony
Maybe this will work: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Custom-Field-types--experimental- On Monday, January 18, 2016 at 11:36:51 AM UTC-5, Mike Constabel wrote: > > Hello, > > I need to map *a new* boolean field in a real postgresql bolean field. >

Re: [web2py] Re: multi tenant

2016-01-18 Thread Fabiano Almeida
Great Massimo! Thanks a lot! Fabiano. 2016-01-17 23:00 GMT-02:00 Massimo Di Pierro : > That URL structure assumes you have a single app running at the domain. So > I am going to assume that is the case. > > first of all you have to map the tenant name ($domain) into > request.args(0) using rout

[web2py] Re: multiple instances of a single form on one page

2016-01-18 Thread aetagothno
For the first method, will I be able to essentially map each instance of form values to their database inserts? Kind of like if the user enters 5 days, 5 copies of form fields are made. The first copy maps to the first day, second copy maps to second day, etc? As for the second method, if I am

[web2py] Re: multiple instances of a single form on one page

2016-01-18 Thread Anthony
On Monday, January 18, 2016 at 12:30:43 PM UTC-5, aetagot...@gmail.com wrote: > > For the first method, will I be able to essentially map each instance of > form values to their database inserts? Kind of like if the user enters 5 > days, 5 copies of form fields are made. The first copy maps to t

[web2py] Re: Additional field type for real boolean

2016-01-18 Thread Mike Constabel
Am Montag, 18. Januar 2016 18:06:32 UTC+1 schrieb Anthony: > > Maybe this will work: > http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Custom-Field-types--experimental- > This looks good. Don't know why I didn't see this before... This seems to work: from gluo

[web2py] Re: Additional field type for real boolean

2016-01-18 Thread Anthony
> > encoder = (lambda x: "true" if x else "false"), > decoder = (lambda x: True if str(x)=="True" else False) > ) > You might need to distinguish between None/NULL and False. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

Re: [web2py] Re: multiple instances of a single form on one page

2016-01-18 Thread Richard Vézina
I think, he just try to figure out how to unlock the multiples inputs values for a given fields where he don't want to use the denormalized way proposed by web2py with list:string. I mean when you want a normalized db schema with a many-to-many relation for use case like tagging... There is not tha

[web2py] Re: Use auto complete without SQL

2016-01-18 Thread Seraaj Muneer
Thanks. I decided against the first issue because as per the application I am porting from Java EE to web2py, there'd be some overheads with that route. With regards to the second issue, I added a function to the insert and update hooks to update any company set that is set as default if the ne

[web2py] Re: best advice on customer/client picklist popup.

2016-01-18 Thread lucas
i did a hybrid of the two suggestions, using the current framework. but i did not use the popup option cuz it is just a bit too much. i create a new row in a form table using jQuery. in an text input field i have an onkeyup that points to some javascript that ajax a partial result set from th

Re: [web2py] Re: SQLFORM.factory() - Display name instead of integer for user_id?

2016-01-18 Thread Richard Vézina
You should use field .clone() method instead of redefining fields... For represent the user_id by it username, you should specify the represent field like this in your IS_IN_DB() validator : IS_IN_DB(db,db.auth_user.id, '%(username)s') Richard On Wed, Jan 13, 2016 at 7:36 PM, Tom Campbell wrot

Re: [web2py] Re: SQLFORM.factory() - Display name instead of integer for user_id?

2016-01-18 Thread Ron Chatterjee
I have a different problem with similar table/field. I have a reference to auth_user. But I want the table to work even it doesn't assign any user. But if I don't pick any auth_user from the drop down menu (assign to) I get an error (attached), value not in a database. And I get the error even

Re: [web2py] Re: SQLFORM.factory() - Display name instead of integer for user_id?

2016-01-18 Thread Richard Vézina
If I understand it properly you need : IS_EMPTY_OR(IS_IN_DB(...)) Richard On Mon, Jan 18, 2016 at 3:17 PM, Ron Chatterjee wrote: > I have a different problem with similar table/field. I have a reference to > auth_user. But I want the table to work even it doesn't assign any user. > But if I do

Re: [web2py] Re: SQLFORM.factory() - Display name instead of integer for user_id?

2016-01-18 Thread Ron Chatterjee
Awesome. Thank you! On Monday, January 18, 2016 at 3:20:35 PM UTC-5, Richard wrote: > > If I understand it properly you need : > > IS_EMPTY_OR(IS_IN_DB(...)) > > Richard > > On Mon, Jan 18, 2016 at 3:17 PM, Ron Chatterjee > wrote: > >> I have a different problem with similar table/field. I have a

Re: [web2py] Re: SQLFORM.factory() - Display name instead of integer for user_id?

2016-01-18 Thread Richard Vézina
You are welcome :) Richard On Mon, Jan 18, 2016 at 4:11 PM, Ron Chatterjee wrote: > Awesome. Thank you! > > On Monday, January 18, 2016 at 3:20:35 PM UTC-5, Richard wrote: >> >> If I understand it properly you need : >> >> IS_EMPTY_OR(IS_IN_DB(...)) >> >> Richard >> >> On Mon, Jan 18, 2016 at 3

Re: [web2py] Re: How do I select and output multiple checkboxes

2016-01-18 Thread Ron Chatterjee
Just a quick question Paolo, Have a tested this code? Because I tried with the same table and pasted the code in web2py.css and it didn't do anything. The concept is right but I believe may have an implementation error. Unless I am missing something. On Saturday, January 16, 2016 at 12:01:03 PM

[web2py] gstreamer embedded in web2py

2016-01-18 Thread Federico Pereira
Hello community, I'm a newbie in web design and I love web2py! I normally use python as a high level language and I think web2py is an excellent way to start. I run at the moment a small code that detects movements in the camera through opencv libraries. In this personal project I want to: * S

Re: [web2py] Re: How do I select and output multiple checkboxes

2016-01-18 Thread Paolo Caruccio
web2py.css is not loaded for default. So, it's better to put my css rules in web2py-bootstrap3.css file (if your application is based on web2py scaffolding layout) or even better in a custom css files. Il giorno lunedì 18 gennaio 2016 23:01:36 UTC+1, Ron Chatterjee ha scritto: > > Just a quick

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-01-18 Thread 黄祥
just wondering why the requires list in a list type [] is not work properly when update (when insert goes fine): e.g. table.email.requires = IS_LIST_OF([IS_LOWER(), IS_EMAIL(), *IS_NOT_IN_DB(db, table.email)* ] ) the problem when update is validator IS_NOT_IN_DB() is always true Value already in

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-01-18 Thread Manuele Pesenti
Il 19/01/16 03:17, 黄祥 ha scritto: > just wondering why the requires list in a list type [] is not work > properly when update (when insert goes fine): > e.g. > table.email.requires = IS_LIST_OF([IS_LOWER(), IS_EMAIL(), > *IS_NOT_IN_DB(db, table.email)* ] ) In case of update I think you have to chan