[web2py] Re: How to process a custom register form?

2013-09-07 Thread Apple Mason
Thanks, I think I understand now. The last snippet looks very clean as opposed to defining the various auth actions in the controller. Also, I think I figured out why the form isn't saving. It's because there are errors on the form, but the errors are hidden. Right now I only display three fiel

Re: [web2py] default error message instad of custom one in SQLFORM

2013-09-07 Thread Annet
Hi Richard, Thanks for your reply. I had a couple of IS_NOT_EMPTY() validators in some modules which modify the default settings of a table. Adding error message to these validators solved the problem. Kind regards, Annet -- --- You received this message because you are subscribed to th

Re: [web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-07 Thread kranthi aeronaut
thanx to all for your suggestions , anthony i have tried your method but i am getting error like this: *ValueError: dictionary update sequence element #0 has length 1; 2 is required* On Saturday, September 7, 2013 12:15:53 PM UTC-7, Anthony wrote: > > > > On Saturday, September 7, 2013 6:50:32

[web2py] Re: Routing A Subdomain (on Openshift)

2013-09-07 Thread Charles Law
For completeness I have modified code in application: application_web2py = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase, logfilename=WEB2PY_LOG, profilerfilename=None) def application(environ, start_respons

[web2py] Re: Routing A Subdomain (on Openshift)

2013-09-07 Thread Massimo Di Pierro
Thank you for letting us know. Others may find it useful. On Saturday, 7 September 2013 20:20:50 UTC-5, Charles Law wrote: > > I came up with an alternative solution, but this only applies to openshift. > > It looks like there is an application file that opeenshift calls, which in > turn calls we

[web2py] Re: Authorization and CRUD

2013-09-07 Thread archeaneon
There are plenty of examples in the development book; I would recommend it. On Friday, September 6, 2013 2:0

[web2py] Re: Cannot run web2py on Cygwin

2013-09-07 Thread Massimo Di Pierro
I have experienced the same problem. Not sure what the problem is. I will investigate asap. Can you please open a ticket about this? On Saturday, 7 September 2013 19:33:22 UTC-5, Melissa Grenier wrote: > > I can't get web2py to run on Cygwin (I'm on Windows). I'm following the > tutorial in > k

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-07 Thread Massimo Di Pierro
You can make a fate table in ram or in cache (DAL('sqlite:memory') or MEMDB), On Saturday, 7 September 2013 16:49:12 UTC-5, Anthony wrote: > > I think he wants the list of dictionaries to be the data displayed in the > table, not to be used to construct a query. > > On Saturday, September 7, 201

[web2py] Re: Routing A Subdomain (on Openshift)

2013-09-07 Thread Charles Law
I came up with an alternative solution, but this only applies to openshift. It looks like there is an application file that opeenshift calls, which in turn calls web2py: https://github.com/prelegalwonder/openshift_web2py/blob/master/wsgi/application I added code that that checks which domain was

[web2py] Cannot run web2py on Cygwin

2013-09-07 Thread Melissa Grenier
I can't get web2py to run on Cygwin (I'm on Windows). I'm following the tutorial in killer-web-developmenton installing web2py on Cygwin but when I run $ ./web2py.py nothing happens when it should be prompting me for a password. Does anyone

[web2py] Long polling and 'holding' a response for later

2013-09-07 Thread archeaneon
I know this has been dealt with before, but I'm having some issues with implementation, and was hoping the community could weigh in. I was thinking of using the scheduler in order to hold, check related status of, and then respond to polls, but I am having trouble figuring out how one would go

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-07 Thread Anthony
I think he wants the list of dictionaries to be the data displayed in the table, not to be used to construct a query. On Saturday, September 7, 2013 2:34:01 PM UTC-4, Massimo Di Pierro wrote: > > Something like this? > > def parse(table,d): >return reduce(lambda a,b:a&b,[table[k]==v for k,v i

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-07 Thread keiser1080
It is possible to use grid or smartgrid without any table? Le samedi 7 septembre 2013 20:34:01 UTC+2, Massimo Di Pierro a écrit : > > Something like this? > > def parse(table,d): >return reduce(lambda a,b:a&b,[table[k]==v for k,v in d.iteritems()]) > > SQLFORM.smartgrid(parse(db.yourtable, {'n

[web2py] Re: response.js is executed twice unless I set web2py-component-content

2013-09-07 Thread Anthony
This has been fixed in trunk. Anthony On Saturday, September 7, 2013 12:19:43 PM UTC-4, simon wrote: > > When I set response.js it seems to get executed twice. This is because of > the following code in web2py.js: > >/* run this here only if this Ajax request is NOT for a web2py > compo

Re: [web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-07 Thread Anthony
On Saturday, September 7, 2013 6:50:32 AM UTC-4, kranthi aeronaut wrote: > > some please help me , i am using web2py for simple addition of 2 numbers > application , i have created a function called "calc" in default.py and > wrote the following code in it > > *def calc():* > *answer=reques

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-07 Thread keiser1080
thanks massimo, I will test later. -- --- 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 to web2py+unsubscr...@googlegroups.com. For more options, visit https://g

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-07 Thread Massimo Di Pierro
Something like this? def parse(table,d): return reduce(lambda a,b:a&b,[table[k]==v for k,v in d.iteritems()]) SQLFORM.smartgrid(parse(db.yourtable, {'name':'alex', 'age':'55'})) On Saturday, 7 September 2013 11:07:31 UTC-5, keiser1080 wrote: > > hi, > > It is possible tu use smartgrid wit

[web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-07 Thread Ykä Marjanen
You can redirect to any page you wish from a function. This way you don't have to create a page for the function and can decide what is the page you want to call. example: def no_page(): redirect(URL('index')) This is beneficial, if you want to have a function which handles the link data

Re: [web2py] Re: Help with 5th ed. book example 11.2.1 not working (conditional fields in forms)

2013-09-07 Thread Robert Moore
Thanks a trillion! I had started looking at the jQuery specifications and had immediately zeroed in on .attr but, because of my unfamiliarity with Javascript in general and jQuery in particular, I didn't see the particular issue just yet. Your help is extremely appreciated. It's very difficult to

[web2py] response.js is executed twice unless I set web2py-component-content

2013-09-07 Thread simon
When I set response.js it seems to get executed twice. This is because of the following code in web2py.js: /* run this here only if this Ajax request is NOT for a web2py component. */ if(xhr.getResponseHeader('web2py-component-content') == null) { web2py.after_ajax(xhr);

[web2py] smartgrid of grid and list of dictionary

2013-09-07 Thread keiser1080
hi, It is possible tu use smartgrid with a list of dictionary in place of a query? Can i do something like this? smartgrid (table, constraints=None, linked_tables=None, links=None, links_in_grid=True , args=

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

2013-09-07 Thread Massimo Di Pierro
yes the number time distance between releases has increased, mostly because the new features we are adding are more complex (or would have done it before). I do not know about the number of users. I definitively think we need more people to blog about web2py. massimo On Saturday, 7 September

[web2py] Re: How to see the SQL that is generated?

2013-09-07 Thread Paolo Caruccio
http://www.web2py.com/book/default/chapter/06#_lastsql Il giorno sabato 7 settembre 2013 16:43:50 UTC+2, arche...@gmail.com ha scritto: > > I was wondering, how would I go about checking the SQL statement that is > generated from the DAL argument? > -- --- You received this message because

Re: [web2py] How to see the SQL that is generated?

2013-09-07 Thread Alfonso de la Guarda
Hi, In the manual there is a reference, however you can do with: info = db(db.names.id>0).select() print info You will get the proper fields, however you can get the query with: info = db(db.names.id>0)._select() print info Check the underline before select. Saludos, ---

[web2py] How to see the SQL that is generated?

2013-09-07 Thread archeaneon
I was wondering, how would I go about checking the SQL statement that is generated from the DAL argument? -- --- 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 to

[web2py] Re: Issue with SQLFORM.smartgrid exportclasses

2013-09-07 Thread Niphlod
In addition to the previous, we support disabling the default export methods with something like tsv=False but doing csv=True was never supported. I think what you're trying to get is with exportclasses=dict( csv_with_hidden_cols=False, xml=False, json=False,

Re: [web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-07 Thread Tim Richardson
On Saturday, 7 September 2013 20:50:32 UTC+10, kranthi aeronaut wrote: > > some please help me , i am using web2py for simple addition of 2 numbers > application , i have created a function called "calc" in default.py and > wrote the following code in it > > *def calc():* > *answer=request.

[web2py] Re: Issue with SQLFORM.smartgrid exportclasses

2013-09-07 Thread Niphlod
uhm. does it work in trunk ? I don't remember where we introduced the exportclasses syntax that you're using, but maybe it has been inserted after 2.5.1 was released. On Saturday, September 7, 2013 2:47:53 PM UTC+2, Loïc wrote: > > Hi there, > > I have a controller which shows some fields of my

[web2py] Issue with SQLFORM.smartgrid exportclasses

2013-09-07 Thread Loïc
Hi there, I have a controller which shows some fields of my database : @auth.requires(auth.has_membership('manager') or auth.has_membership( 'event_manager')) def edit_contacts_calendar(): db.calendar_contact.event.readable = db.calendar_contact.event.writable = True linked_tables=['cal

[web2py] Re: wsgihandler.py not exist!

2013-09-07 Thread Niphlod
if you dowloaded the trunk version, all handlers are in the /handlers directory: just copy the one you need to the root and you're good to go. On Saturday, September 7, 2013 7:33:38 AM UTC+2, Dmitry Ermolaev wrote: > > I install on MS Server2000 Apache 2.2 + python2.7 + web2py > > but wsgihandler

Re: [web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-07 Thread kranthi aeronaut
some please help me , i am using web2py for simple addition of 2 numbers application , i have created a function called "calc" in default.py and wrote the following code in it *def calc():* *answer=request.vars.a+request.vars.b* *return dict(answer)* * * i created a file called default/add

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

2013-09-07 Thread LightDot
I'm always sorry to see a good open source project with little or no documentation and a myriad of them are in this sad state. Luckily, web2py doesn't have this problem. The existence of the documentation is this fairly complete form is one of the reasons I chose web2py over other python framew

[web2py] Re: Help with 5th ed. book example 11.2.1 not working (conditional fields in forms)

2013-09-07 Thread Alex
write if(jQuery('#taxpayer_married').is(':checked')) instead of if(jQuery('#taxpayer_married').attr('checked')) attr returns the value as it is initially defined in html. With 'is' you are querying the current state. Alex Am Samstag, 7. September 2013 05:34:33 UTC+2 schrieb REM: > > > I am tryi

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

2013-09-07 Thread webpypy
As Massimo said, " the main advantage/objective of web2py framework is to be the easiest and fastest to develop web applications". I think the rate of growing popularity/interest was high for versions < 2.0 , compared with versions >= 2.0 . Maybe because of the big size of manual for versions >