[web2py] web2py newbie question

2013-08-30 Thread Mirko
unique=True), format='%(name)s') db.define_table('dog', Field('name'), Field('owner', type='reference person', required=True)) Thanks a lot, Mirko -- --- You received this message because you are subscribed to the Google Groups "web2py-users&

[web2py] required=True for Field type=list:reference

2013-09-02 Thread Mirko
Hi, I expected this to be validated when at least one entry is selected but validation let this pass when nothing is selected. Any ideas ? Thanks, Mirko PS: after validation, the correponding db field contains "||" which may be should be considered as an empty value

[web2py] Re: required=True for Field type=list:reference

2013-09-02 Thread Mirko
Ok, but if the default validator for a list:reference field does allow zero options to be selected, required=True and required=False makes no difference, isn't it ? Thanks, Mirko On Monday, September 2, 2013 3:15:18 PM UTC+2, Anthony wrote: > Note, IS_IN_DB(..., multiple=True), whic

[web2py] smartgrid and represent

2013-09-27 Thread Mirko
code line is executed and it looks like on creation or editing smartgrid is reloading the table definition after that... Or I'm I missing something ? Thanks in advance! Mirko -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2p

[web2py] Re: smartgrid and represent

2013-09-27 Thread Mirko
def manage_test(): db.thing.owner_id.represent=lambda id, row: '%s' % db.person[row.owner_id].name.upper() grid=SQLFORM.smartgrid(db.thing) return dict(grid=grid) db.thing.owner_id.represent is not taken into account when click on add or edit button. Many thanks! On Frida

[web2py] Re: Virtual Fields and Smartgrid not working as expected

2013-09-27 Thread Mirko
Hi, I confirm this error here with 2.5.1 Ciao ciao Mirko On Thursday, September 19, 2013 10:49:35 AM UTC+2, hiro wrote: > > In the book I read: > > *Showing virtual fields in SQLFORM.grid and smartgrid* > In recent versions of web2py, virtual fields are shown in grids like

[web2py] Re: smartgrid and represent

2013-09-27 Thread Mirko
t; > Note, with the above, you no longer need to explicitly change the > db.thing.owner_id.represent attribute. > > Anthony > > On Friday, September 27, 2013 7:30:13 AM UTC-4, Mirko wrote: >> >> Here's a code example : >> >> db definition: >> db.defin

[web2py] Re: smartgrid and represent

2013-09-27 Thread Mirko
with that code)? It > definitely works when I try it. > > Anthony > > On Friday, September 27, 2013 9:22:37 AM UTC-4, Mirko wrote: >> >> Hi Anthony, and thanks for answering. >> >> Actually >> >> db.person._format = lambda row: '%s' % row.name.upp

[web2py] Re: Issue running doctest with decorated functions

2013-10-03 Thread Mirko
Hi all, I confirm "*python web2py.py -T a/b/c"* is not working with 2.5.1 when function c is decorated with *@auth.requires_login()* It works fine without that decoration and I don't know how to authenticate when running doctests from command line, any suggestions ? Many tha

[web2py] Re: Issue running doctest with decorated functions

2013-10-03 Thread Mirko
You need to add some logic that says: > > if request.function = '_TEST': > auth.login_bare('user_for_test','his/her password') > > On Thursday, 3 October 2013 07:02:09 UTC-5, Mirko wrote: >> >> Hi all, >> >> I confirm "*p

[web2py] Re: Issue running doctest with decorated functions

2013-10-03 Thread Mirko
Eventually I got something working (may be crappy) to put on top of controller file: *if request.global_settings.cmd_options.test.startswith('%s/%s' % (request.application,request.controller)): auth.login_bare('user_for_test','his/her password') * Mirko On

[web2py] Re: Issue running doctest with decorated functions

2013-10-03 Thread Mirko
27;userpassword') On Thursday, October 3, 2013 10:55:01 PM UTC+2, Massimo Di Pierro wrote: > > please open a ticket about this. we need a new request.is_shell option or > something similar to detect this state. > > On Thursday, 3 October 2013 09:52:07 UTC-5, Mirko wrote: >&

[web2py] reference type field issue when requires is set ?

2013-10-04 Thread Mirko
d when function above is called, but if I want to restrict owner_id (to male only for example) with this : db.thing.owner_id.requires=IS_IN_DB(db(db.person.gender_id==db.gender(name= 'M').id),'person.id') the owner_id's name is not displayed anymore, I see the owner id inste

[web2py] smartgrid with linked tables url hacking

2013-10-04 Thread Mirko
acking url by removing pieces is very well managed except for this case : * https://myserver/myapp/mycontroller/mytest/person/thing.owner_id* , for which breadcrumb displays a weird *Persons > Unknown > Things* ... Is it a bug ? Thanks! Mirko -- Resources: - http://web2py.com - ht

[web2py] Re: reference type field issue when requires is set ?

2013-10-04 Thread Mirko
Hi Anthony, the issue I am pointing to is related to the display of the "owner_id" values in the grid itself and yes, my *real* code sets the "requires" attribute directly in the "thing" table definition rather than after the fact as shown above, I didn't think that this would make a difference,

[web2py] Re: web2py 2.7.1 is OUT

2013-10-06 Thread Mirko
Hi, Is it this one ? https://github.com/mdipierro/web2py-book Thanks, Mirko On Monday, October 7, 2013 3:36:09 AM UTC+2, Tim Richardson wrote: > > the trunk version of the book available on GIT is as up to date as > possible (and a lot more recent than the version linked to on th

[web2py] Re: CAS Auth redirect loop

2013-10-10 Thread Mirko
Hi all, being on a LAN and behind a proxy, I solved this with: export https_proxy="" export http_proxy="" (on a linux box) Cas auth is working like a charm after that :) Hope it helps, Mirko On Wednesday, August 17, 2011 8:36:45 PM UTC+2, Bruno Codeman wrote: > >

[web2py] web2py & jenkins

2013-10-17 Thread Mirko
b2py httpd instance launch might be a clue). Thanks! Mirko -- 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 sub

[web2py] Re: new feature in trunk

2013-10-21 Thread Mirko
// sorting this may permit to manage siblings Field('node_name','string')) Eventually a delirious attribute table evolution might be to have a type field (string, integer, reference, ) and validator per node attribute, but I can't figure out how to d

[web2py] Re: One of the best things that happened to web2py

2013-10-29 Thread Mirko
2.7.4 , great ! On Monday, October 28, 2013 5:41:35 PM UTC+1, Massimo Di Pierro wrote: > > I am happy to announce a great new opportunity for web2py users: > > https://www.pythonanywhere.com/try-web2py > > Basically they give you the opportunity to create a web2py instance > directly from th

[web2py] Web Framework Benchmarks

2013-11-13 Thread Mirko
http://www.techempower.com/benchmarks/ A lot of web frameworks but no web2py in this list... :( -- 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 receiv

[web2py] Re: grid layout problem

2013-11-15 Thread Mirko
Hi Stefan, how do you make the new buttons created by "links" stick close to the delete, edit, .. buttons under the same header ? Thanks! On Tuesday, October 8, 2013 2:06:13 PM UTC+2, stefaan wrote: > > Hello all, > > I noticed the following when using a grid with some "links" (custom > buttons)

[web2py] Re: add new button in GRID with same look and feel

2013-11-15 Thread Mirko
Hi Sarbjit, did you manage to have the placement of your button under the same header where the default grid buttons are ? I'm also unsuccessful here... Thanks! Mirko On Sunday, November 3, 2013 4:45:55 AM UTC+1, Sarbjit wrote: > > I have added a new button in grid using lin

[web2py] Re: add new button in GRID with same look and feel

2013-11-15 Thread Mirko
Just figured out how to do that : links=[ {'header':'...','body':lambda row: ...}, lambda row: TAG.button(T('Accept'),_type="button",_onclick='alert("%s")' %row.id) ] the second item of links list goes with the d

Re: [web2py] Re: grid layout problem

2013-11-15 Thread Mirko
Hi Stefaan, just find the answer and posted it here : https://groups.google.com/d/msg/web2py/LhuZvOAv_K4/Y11Ap1QCEYwJ Hope it helps, Mirko On Friday, November 15, 2013 10:01:24 AM UTC+1, stefaan wrote: > > Hi Mirko, > > short answer: I have no idea really, it just came out li

[web2py] grid links appearing in details

2013-11-15 Thread Mirko
Hi all, I have grid "links" appearing in details, on the same row than the 'back' and 'edit' buttons. How can I make them not display ? Thanks ! Mirko -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2p

[web2py] Re: grid links appearing in details

2013-11-15 Thread Mirko
Yes, but they disappear from the grid as well... On Friday, November 15, 2013 4:21:15 PM UTC+1, 黄祥 wrote: > > had you already try to set links=None? > > ref: > > http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM.grid-signature > > best regards, > stifan > -- Resources: -

[web2py] Re: grid links appearing in details

2013-11-15 Thread Mirko
t.args > > Anthony > > On Friday, November 15, 2013 10:43:36 AM UTC-5, Mirko wrote: >> >> Yes, but they disappear from the grid as well... >> >> On Friday, November 15, 2013 4:21:15 PM UTC+1, 黄祥 wrote: >>> >>> had you already try to set li

[web2py] A helper and delete argument

2013-11-15 Thread Mirko
arning popup appear * html table row is deleted * table row is not deleted I'm very happy with this behavior except that I was wondering if it's possible not make the popup appear as long as the table row is not deleted ? Thanks! Mirko web2py 2.5.1 -- Resources: - http://web2py.com -

Re: [web2py] Re: Estore (new!)

2013-11-18 Thread Mirko
https://github.com/pierrenoizat/webshop Written in RoR . A web2py port shouldn't be too difficult... On Monday, November 18, 2013 10:54:56 PM UTC+1, samuel bonill wrote: > > also, might be a good idea that could accept bitcoin payments... > > > 2013/11/18 samuel bonill > > >> hi massimo, how i ca

[web2py] Re: github - please follow

2013-12-18 Thread Mirko
done On Saturday, August 24, 2013 11:26:03 PM UTC, Massimo Di Pierro wrote: > > web2py has many users but few github followers. This is a problem because > the number of followers is a metric that can be used to guess popularity. > > You can help. > > Get a github account and click on the star.

[web2py] Re: Possibly a problem with CAS redirection in v2.8.2

2014-01-06 Thread Mirko
Hi, some time ago I had a similar issue that I solved this way : https://groups.google.com/d/msg/web2py/FhtokyNZT7k/QEFQOdMzIP4J Hope it helps, Mirko On Friday, December 20, 2013 8:05:10 PM UTC, viniciusban wrote: > > Hi guys, > I'm playing around with CAS and fa

[web2py] Export issues

2014-01-31 Thread Mirko
,'reference gender'),format='%(forename)s') def manage_friends(): grid = SQLFORM.grid(db.friend) return locals() The problem is that the sex gender string is retrieved along with the forename string for html and tsv exports, but not for csv, xml and json export

[web2py] Re: Export issues

2014-01-31 Thread Mirko
No, same behavior with web2py 2.5.1-stable On Friday, January 31, 2014 9:45:28 AM UTC, Alan Etkin wrote: > > Hi all, >> >> I downloaded web2py from trunk on Jan 29th and I found some issues with >> export. >> > > Did you have a consistent output on earlier versions? > -- Resources: - http://web

[web2py] Re: Export issues

2014-01-31 Thread Mirko
Done. https://code.google.com/p/web2py/issues/detail?id=1866 On Friday, January 31, 2014 10:43:33 AM UTC, Alan Etkin wrote: > > No, same behavior with web2py 2.5.1-stable >> > > Then I think it should be fixed in trunk. Can you file an issue? > -- Resources: - http://web2py.com - http://web2py.c

[web2py] Re: Credit card payment for european web site

2014-10-27 Thread Mirko
Hi, try http://www.worldpay.com/global, it has a nice api. -Mirko On Monday, October 27, 2014 9:52:16 AM UTC+1, Gael Princivalle wrote: > > Hello. > > I'm still checking how to do an ecommerce website with web2py. > As the website will be Italian, I've to

Re: [web2py] Re: Credit card payment for european web site

2014-10-27 Thread Mirko
No, but I did it in Plone quite smoothly a long time ago. On Monday, October 27, 2014 10:16:52 AM UTC+1, Gael Princivalle wrote: > > Hi Mirko. > > Have you already integrate worldplay inside web2py ? > > -- > Gael Princivalle > > 2014-10-27 10:01

[web2py] Re: DAL update expressions starting with an integer not working?

2014-05-28 Thread Mirko
I never updated data this way before, and after having made some tests, it turns out that db.table.lft type is a Field that is converted into a string and then an integer later (I don't know how). And I try the example from the book db(db.table.lft>0).update(lft=db.table.lft+1) appends the stri

[web2py] Re: Have tickets delivered via email

2014-10-16 Thread Mirko
There's a tickets2email.py file in scripts folder. Works like a charm. hth - Mirko On Thursday, October 16, 2014 3:02:58 PM UTC+2, Jim S wrote: > > I looked through the book and the the forum here but can't find the answer. > > Is there a way to configure it so that all w

[web2py] float field search and grid/smartgrid

2014-10-16 Thread Mirko
Sorry, is the float search implemented in grid and smartgrid? I have a table with date, string and float fields and float fields are not searchable. Thanks, -Mirko -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] Re: float field search and grid/smartgrid

2014-10-16 Thread Mirko
own list, any ideas ? I'm using web2py Version 2.9.11-stable+timestamp.2014.09.15.23.35.11 on windows platform (downloaded 2 days ago from web2py website). Thanks for helping, -Mirko On Thursday, October 16, 2014 5:03:12 PM UTC+2, Mirko wrote: > > Sorry, is the float search implemented

[web2py] Re: float field search and grid/smartgrid

2014-10-18 Thread Mirko
Up... Anybody else had this issue ? Thanks, -Mirko On Friday, October 17, 2014 8:44:41 AM UTC+2, Mirko wrote: > > Hi all, > maybe I should elaborate a little bit more: > > here's my model: > db.define_table('myTable', > Field('myDate',

[web2py] Re: float field search and grid/smartgrid

2014-10-20 Thread Mirko
Have this issue also with Linux(Ubuntu). On Saturday, October 18, 2014 8:17:59 PM UTC+2, Mirko wrote: > > Up... > Anybody else had this issue ? > Thanks, > -Mirko > > On Friday, October 17, 2014 8:44:41 AM UTC+2, Mirko wrote: >> >> Hi all, >> may

[web2py] Re: float field search and grid/smartgrid

2014-10-20 Thread Mirko
Found it, 'float' is not a field type, I should have used 'double'. Nevertheless 'float' is accepted as field type in table definitions (shouldn't be) and is not displayed in search forms. hth -Mirko On Monday, October 20, 2014 3:21:21 PM UTC+2, Mirko wrote:

Re: [web2py] Re: How to leverage web2py popularity and usage?

2013-09-09 Thread Mirko Scavazzin
I'm interested in. Julie Bouillon a écrit : >If there's enough enough bloggers out there writing about web2py, I'll be >happy to put a "planet web2py" in place. >Just let me know if there's an interest for that. > >Julie > >On 09/07/2013 06:01 PM, Massimo Di Pierro wrote: > >yes the number time

Re: [web2py] web2py show() function. (explanation of a line of code)

2013-12-15 Thread Mirko Scavazzin
0=>first arg cast=int => convert it into int (it is a string actually) IMHO 2013/12/15 deepak sandhu > so this is a function show() which I am trying to understand. in the model > I do have a db.image table where I stored some images which is pointed in > the function. > > the only line I am no

Re: [web2py] Re: Important New Year News: Edison Award

2014-01-04 Thread Mirko Scavazzin
Way to go !! Congrats ! 2014/1/5 Cliff Kachinske > Best of luck. > > Hope you (and web2py) bring back an award. > > > On Friday, January 3, 2014 11:08:38 PM UTC-5, Massimo Di Pierro wrote: >> >> Web2py/me have been nominated for the Edison Award. Please wish web2py >> (and me) good luck. :-) >>

Re: [web2py] Happy New Year everybody!

2014-01-04 Thread Mirko Scavazzin
Happy new year! 2014/1/5 Calvin > Happy New year Massimo and all the contributors who have made web2py so > awesome! > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues

Re: [web2py] Re: Export issues

2014-01-31 Thread Mirko Scavazzin
ok I will 2014-01-31 Alan Etkin : > No, same behavior with web2py 2.5.1-stable >> > > Then I think it should be fixed in trunk. Can you file an issue? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https:

Re: [web2py] Trying to run web2py from linux, all ports fail

2015-01-29 Thread Mirko Scavazzin
*TIME_WAIT** is the state that typically ties up the port for several minutes after the process has completed.*The length of the associated timeout varies on different operating systems, and may be dynamic on some operating systems, however typical values are in the range of one to four minutes. HT

Re: [web2py][Javascript] Massimo here searching for some javascript devs ready to port web2py in JS

2014-04-01 Thread Mirko Scavazzin
April's fool ! :) 2014-04-01 17:44 UTC, Richard : > Hello, > > I want to get rid of python entirely. As you probably know, I don't see > great future in Python 3000 and since we can't fighting the Javascript > dominance in webapp development world, I resign... I want to port web2py to > > javascri