[web2py] Question about sum()

2013-02-10 Thread Calycé
Hi all, Given a query like the following one: booked = db.booking.seats.sum() db(db.schedule.training==db.training.id).select(db.schedule.training_date,db .training.short_title, db.schedule.seats, db.booking.seats.sum(), groupby=(

[web2py] Re: Question about sum()

2013-02-10 Thread Calycé
Grazie mille Massimo, It is indeed what I was looking for :-) On Sunday, February 10, 2013 5:19:55 PM UTC+1, Massimo Di Pierro wrote: I think you want: booked = db.booking.seats.sum().coalesce_zero() On Sunday, 10 February 2013 02:53:40 UTC-6, Calycé wrote: Hi all, Given a query like

[web2py] Bug in database administration

2013-02-07 Thread Calycé
in the database administration or am I doing something wrong ? BTW, I'm using 2.3.2. Thanks for your help. Calycé -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email

[web2py] Re: Bug in database administration

2013-02-07 Thread Calycé
, it works. I'm still wondering why I need to use a lambda to have it working. If someone has a clue I'm all ears ;-) On Thursday, February 7, 2013 4:31:56 PM UTC+1, Calycé wrote: Hi all, I have an error in the database administration when using the following code in db.py: db.define_table

[web2py] Re: Bug in database administration

2013-02-07 Thread Calycé
. There is another notation: db.define_table('cgc_schedule', ... format=lambda row: '%s %s' % (row.training.short_title, row.training_date)) and this will do what you ask since it is more explicit. On Thursday, 7 February 2013 09:31:56 UTC-6, Calycé wrote: Hi all, I have

[web2py] Form processing and css

2013-02-05 Thread Calycé
welcome any idea/comment cause I'm lost on this one. Oh, and my search did not returned anything interesting but my google fu might not be as efficient as yours ;-) Calycé -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] Re: Form processing and css

2013-02-05 Thread Calycé
}} creates the form/form tags for you, so you've actually put one form inside another form. Anthony On Tuesday, February 5, 2013 9:34:10 AM UTC-5, Calycé wrote: Hi all, I have a problem with a form which is not processing and I don't know why. First things first, here's the definition

[web2py] Is it possible to modify textarea cols of SQLFORM.grid ?

2013-02-05 Thread Calycé
Hi all, Can someone tell me if it's possible to change the number of cols for a textarea when editing a record through SQLFORM.grid ? I tried with maxtextlength but w/o success. I also saw that there is maxtextlengths but I'm unsure on how to use it and if it is what I need. Calycé

[web2py] Setting class for MENU helper

2012-12-02 Thread Calycé
Hi all, I'm rendering a menu with the following line of code: nav div id=menu-iconMenu/div {{=MENU https://cgc.yedia.com/examples/global/vars/MENU(response https://cgc.yedia.com/examples/global/vars/response.menu, _class='menu responsive-menu', ul_class=None, li_class=None,

[web2py] Re: Setting class for MENU helper

2012-12-02 Thread Calycé
2012 04:18:51 UTC-6, Calycé wrote: Hi all, I'm rendering a menu with the following line of code: nav div id=menu-iconMenu/div {{=MENU https://cgc.yedia.com/examples/global/vars/MENU(response https://cgc.yedia.com/examples/global/vars/response.menu, _class='menu responsive-menu

[web2py] Re: Setting class for MENU helper

2012-12-02 Thread Calycé
*/ {/* apply your rules, for example: */ color: red; background-color: yellow; } Il giorno domenica 2 dicembre 2012 11:18:51 UTC+1, Calycé ha scritto: Hi all, I'm rendering a menu with the following line of code: nav div id=menu-iconMenu/div {{=MENU https://cgc.yedia.com

[web2py] Returning an array in a SOAP result

2012-11-13 Thread Calycé
Hi all, Can somebody tells me how I can return an array in a SOAP result ? It's not clear to me from reading the pysimplesoap documentation and the web2py book is a little light on the subject. I must admin I'm not (yet?) a SOAP specialist... Many thanks. --

[web2py] Is there a way to force https usage for specific controller

2012-11-11 Thread Calycé
Hi all, Probably a silly question, but is there an easy way to force https for specific controller ? I saw in db.py that by ucommenting the line request.requires_https() I can force redirection from http to https, but can I do that only for a specific controller ? Many thanks. --

[web2py] Re: Is there a way to force https usage for specific controller

2012-11-11 Thread Calycé
found it on the net and it is not tested. On Sunday, 11 November 2012 20:16:04 UTC, Calycé wrote: Hi all, Probably a silly question, but is there an easy way to force https for specific controller ? I saw in db.py that by ucommenting the line request.requires_https() I can force

Re: [web2py] little css issue and french translation

2012-09-05 Thread Calycé
Hi Richard, The french translation would be better as: Propulsé par and not Propulser par. BTW, nice to see french speaking folks around here ;-) On Wednesday, September 5, 2012 4:31:10 PM UTC+2, Richard wrote: Hello, I found that if the number of menu entries are to high or if the text

[web2py] Re: need a simple wiki...

2012-08-20 Thread Calycé
Pystar, In the admin, add a group named 'wiki_editor' and put yourself in that group. Logout (if you were logged in the application), login and normally voilà! That's what I did and it worked. On Monday, August 20, 2012 7:43:34 AM UTC+2, Pystar wrote: Max, Tried it, still gives me the 401

[web2py] T function and database records - html entities

2012-08-17 Thread Calycé
Hi all, I'm using the T function to produce some text in a multilingual application, but I'm facing a small problem. If i use T('Aller à') I receive the exact same string but when using T(' blabla') I receive 'gt; blabla'. In the second case the greater than sign is correctly rendered in html

[web2py] Re: web2py recipe book

2012-03-14 Thread Calycé
and all devs for this little gem that web2py is ;-) Calycé On Mar 12, 8:18 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: The web2py recipes book is finally out: http://www.packtpub.com/web2py-application-development-recipes-to-mas... Congratulations to all those who contributed

[web2py] Re: web2py recipe book

2012-03-14 Thread Calycé
: is Packt a british company??? my total is in pounds which is odd.. d On Wednesday, March 14, 2012 8:15:17 AM UTC-7, Calycé wrote: For those interested the following coupon code: bawdanu gives you a 40% off on any Pack eBook. I just used it to buy this ebook that I'm eager to read

[web2py] Re: Postgres: what am i doing wrong ?

2012-02-08 Thread Calycé
Anthony, You pointed me in the right direction. I thought DAL() was systematically importing the model... my wrong. Once I added auto_import=True everything worked as expected. Thanks a lot. PS: Many thanks too to the others who gave me some advice ;-) On Feb 7, 6:26 pm, Anthony

[web2py] Postgres: what am i doing wrong ?

2012-02-07 Thread Calycé
Hi all, I'm starting a new project in which I'm using Postgresql, but I have some problems. I have defined a couple of tables in models/db.py. I can see and manipulate those tables through web2py's admin interface, but when I try to use DAL I'm facing some problems. I can connect without problem,

[web2py] Re: Postgres: what am i doing wrong ?

2012-02-07 Thread Calycé
Calycé welcome.to.dev.n...@gmail.com: Hi all, I'm starting a new project in which I'm using Postgresql, but I have some problems. I have defined a couple of tables in models/db.py. I can see and manipulate those tables through web2py's admin interface, but when I try to use DAL

[web2py] Is there something like an optional requires

2011-10-21 Thread Calycé
Hi all, I have created a table with a self reference as described below: db.define_table('category', Field('parent_category', 'reference category'), Field('name', 'string', length=40, required=True), Field('description', 'text', required=True), Field('small_image', 'upload')) Now

[web2py] SQLite checkpoint

2011-10-21 Thread Calycé
Hi all, A small question: Is there a way to force a checkpoint for SQLite databases ?

[web2py] Re: Is there something like an optional requires

2011-10-21 Thread Calycé
in the combo but is correctly inserted in the table. I have to reload the page in order to see the last inserted category in the combo. For the 0 or it's a bad cut 'n paste... my bad. On Oct 21, 2:56 pm, DenesL denes1...@yahoo.ca wrote: Hi Calycé, note that: store.category.parent_category.requires = 0

[web2py] Re: Is there something like an optional requires

2011-10-21 Thread Calycé
insert of the submitted form, so the new form doesn't have the most up-to-date set of values. If that's the case, it should probably be fixed. On Friday, October 21, 2011 9:28:38 AM UTC-4, Calycé wrote: Thanks a lot to both of you the IS_EMPTY_OR() was indeed what I was needing (note