Re: [web2py] Re: multiple SQLFORM.grid on tabs

2014-08-12 Thread Vid Ogris
Thanks for reply I get both grids but they are not in different tabs but both in the same and in addition, when I open view or edit option I get double view for one record? 2014-08-11 16:58 GMT+02:00 Cliff Kachinske : > I would just use ajax or LOAD. > > If you really want to use grid, somethin

[web2py] Issue 1961; redirect, response.headers and CAS

2014-08-12 Thread Remco Boerma
Thanks Massimo, Concerning https://code.google.com/p/web2py/issues/detail?id=1961&can=1 The CAS structure uses redirect() internally. Can you update the call in the CAS code to send the request.headers? That's why i proposed a change on all redirect calls. This allows the CAS to be CORS com

[web2py] converting rows object into javascript array (array of arrays)

2014-08-12 Thread Mirek Zvolský
I need a javascript array of arrays for the autocomplete control. There are not so much records, so I can fetch them all before, without use of ajax inside the autocomplete control. Following works for me, but I am not sure if this is optimal way (if 2 steps are necessary): var oCustomers = {{=

[web2py] How to use this module?

2014-08-12 Thread lyn2py
With reference to SimpleCV . Although it is a PY (I can drop into the modules folder and just import), it has a number of dependencies: pygame>=1.9.1 PIL==1.1.7 nose>=1.0.0 ipython>=0.12 numpy>=numpy-2.0.0 Please correct me if I am wrong: 1. Only pure python modules ca

[web2py] Dynamic menu update

2014-08-12 Thread Richard
Hello, I have a farely large menu structure in a page through buttons with dropdown menu's which are changed dynamically. A refresh of the whole page take about 5 seconds which is too long. Now I want to split this using components. These components must be reloaded depending on additions to t

[web2py] Random form field order

2014-08-12 Thread Richard
For updating a dynamically generated table I use a temporarily table and a SQLFORM on that table. This works fine except the sequence of the fields looks random to me. I use the following code: lev_fields_dict= { Field( "d"+str(eval('db.%s'%request.vars.lev_table)[date_row.id]['

[web2py] form.auth.register() does not add user

2014-08-12 Thread Ruud Schroen
I have this: My form: auth.settings.register_onaccept = lambda form: __add_user_membership(form) auth.settings.register_next = URL('members', 'ingeschreven') return dict(form=auth.register()) My onaccept function: def __add_user_membership(form): user_id = form.vars.id if form.vars.is_co

[web2py] Re: form.auth.register() does not add user

2014-08-12 Thread Leonel Câmara
Please don't do this: if form.vars.is_company==True: Just if form.vars.is_company: Is enough. Then auth.settings.register_onaccept.append(lambda form: __add_user_membership(form)) Notice that I'm using append instead of =. -- Resources: - http://web2py.com - http://web2py.com/book (Docume

[web2py] Re: Random form field order

2014-08-12 Thread Anthony
Your lev_fields_dict is not a dictionary but a set object (if you use curly braces without providing both keys and values separated by colons, you get a set). Neither sets nor dictionaries preserve order. In any case, you don't need a set -- just use a list (replace the curly braces with bracket

[web2py] Re: Random form field order

2014-08-12 Thread Richard
Anthony, Thank you, both hints work fine :) Richard D On Tuesday, August 12, 2014 12:16:57 PM UTC+2, Richard wrote: > > For updating a dynamically generated table I use a temporarily table and a > SQLFORM on that table. > This works fine except the sequence of the fields looks random to me. > >

[web2py] Re: How to use this module?

2014-08-12 Thread Mirek Zvolský
I don't know this package, but I think it is possible install it in this way: 1. OpenCV - based on OS, f.e. Windows: from http://www.lfd.uci.edu/~gohlke/pythonlibs/ Debian: aptitude: python-opencv 2. pip install SimpleCV this will install all dependencies 3. import SimpleCV D

[web2py] RESTful PATCH request not working

2014-08-12 Thread Falko Delarue
The backbone.js framwork defines the following request type map http://backbonejs.org/docs/backbone.html#section-153 // Map from CRUD to HTTP for our default `Backbone.sync` implementation. var methodMap = { 'create': 'POST', 'update': 'PUT', 'patch': 'PATCH', 'delete': 'DELETE'

[web2py] Re: RESTful PATCH request not working

2014-08-12 Thread Leonel Câmara
The problem is probably that in your PATCH function you're accessing request.args(0) when you should be using args[0]. For further help you need to examine the error message you're getting as calling your PATCH is raising TypeError exceptions which usually means something isn't getting the corr

[web2py] Re: RESTful PATCH request not working

2014-08-12 Thread Falko Delarue
On Tuesday, August 12, 2014 6:10:28 PM UTC+2, Leonel Câmara wrote: > > The problem is probably that in your PATCH function you're accessing > request.args(0) when you should be using args[0]. > What? this cannot be right, the request.args(0) is a standard function globally available for a long

Re: [web2py] Re: Controller to do SOAP to an action-less service, how to generate the (xml) nodes

2014-08-12 Thread Dave S
On Monday, August 11, 2014 9:33:38 PM UTC-7, Mariano Reingart wrote: > > Sorry but I don't fully understand your message. > > What's the problem using pysimplesoap? > What's wrong is my knowledge of how to do some funky WSDL in pysimplesoap. > Can you provide an example using it (explaining

[web2py] Re: Web2py vs ruby on rails for a startup?

2014-08-12 Thread Dave S
On Monday, August 11, 2014 10:24:37 PM UTC-7, Massimo Di Pierro wrote: > > http://www.meetup.com/OWASP-OC/ > > Are you nearby? > Yep, that Orange County. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] Re: RESTful PATCH request not working

2014-08-12 Thread Leonel Câmara
That's not exactly true, the thing is, you want the rest API to inform the caller if it's calling it wrong, and that's what web2py thinks it's happening. Rest actions are run this way: try: return rest_action(*_self.args, **getattr(_self, 'vars', {}))

Re: [web2py] Re: multiple SQLFORM.grid on tabs

2014-08-12 Thread Massimo Di Pierro
You cannot have multiple grids in one page because they use the url args to set their parameters. Unless you load the grid separately via ajax. On Tuesday, 12 August 2014 02:10:38 UTC-5, Yebach wrote: > > Thanks for reply > > I get both grids but they are not in different tabs but both in the sam

[web2py] web2py grid select all filtred rows

2014-08-12 Thread keiser1080
Hi, is there a way to get the query or the list of id from a filtred grid? for example a grid listing all students with pagination => filter data using the search widget of the grid student.age > 20 => 2000 rows (multiple pages) => send data to another page or fonction ? -- Resources: - h

[web2py] Re: Issue 1961; redirect, response.headers and CAS

2014-08-12 Thread Massimo Di Pierro
Will do it tonight. CAS CORS compliancy is important. On Tuesday, 12 August 2014 03:05:27 UTC-5, Remco Boerma wrote: > > Thanks Massimo, > > Concerning https://code.google.com/p/web2py/issues/detail?id=1961&can=1 > > The CAS structure uses redirect() internally. Can you update the call in the >

[web2py] Re: Additional submit buttons on form

2014-08-12 Thread Stephen Weiss
I discovered that you can add a buttons list to an SQLFORM.factory call. The last post in this question has syntax https://groups.google.com/forum/#!searchin/web2py/buttons/web2py/Hu8iCzOA9Lk/lJnVtBLNvK8J This allows for multiple submit buttons to the same controller code and in there you ca

Re: [web2py] Re: Controller to do SOAP to an action-less service, how to generate the (xml) nodes

2014-08-12 Thread Dave S
On Monday, August 11, 2014 9:33:38 PM UTC-7, Mariano Reingart wrote: > > [...] > > https://code.google.com/p/pysimplesoap/wiki/SoapClient#Raw/arbitrary_SOAP_Header_Example > > Are the links to examples there and down below in #Fixing_broken_WSDL out-of-date? /dps -- Resources: - http://web2p

Re: [web2py] Re: multiple SQLFORM.grid on tabs

2014-08-12 Thread Vid Ogris
How can I do that? Load via Ajax? 2014-08-12 19:41 GMT+02:00 Massimo Di Pierro : > You cannot have multiple grids in one page because they use the url args > to set their parameters. Unless you load the grid separately via ajax. > > > On Tuesday, 12 August 2014 02:10:38 UTC-5, Yebach wrote: >> >

[web2py] Record versioning without duplicate archive records?

2014-08-12 Thread Jack Kuan
Hi, just starting out with web2py. Given a table with record versioning enabled, I find that for every successful update operation a row will be inserted in the archive table. I'm using update_or_insert(), is it possible to make web2py only copy an old row into the archive table when there's a

[web2py] Error in wsgi/apache

2014-08-12 Thread Nail Hassairi
I am getting errors like this: [Mon Aug 11 16:34:23 2014] [error] [client 54.200.16.41] mod_wsgi (pid=23422): Exception occurred processing WSGI script '/home/econ/utility/web2py/wsgihandler.py'. [Mon Aug 11 16:34:23 2014] [error] [client 54.200.16.41] IOError: failed to write data [Mon Aug 11

[web2py] Login restricted based on subscription

2014-08-12 Thread Kenneth
Hello everyone, I'm building a site that clients subscribes to so I need to limit their login based on the subscription. Is there a built in feature to limit login to a date range? Kenneth -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/w

[web2py] Re: Implementing A Large Scale Engineering Equations Calculator in web2py

2014-08-12 Thread pang
You may want to look into the Sage software (python distribution of scientific libraries and python goodies + a consistent interface), specifically the "interact" feature: http://interact.sagemath.org/ http://wiki.sagemath.org/interact the "sage cell server": https://sagecell.sagemath.org/stat

[web2py] Re: Login restricted based on subscription

2014-08-12 Thread Dave S
On Tuesday, August 12, 2014 1:28:11 PM UTC-7, Kenneth wrote: > > Hello everyone, > > I'm building a site that clients subscribes to so I need to limit their > login based on the subscription. Is there a built in feature to limit login > to a date range? > > > I would use the scheduler to run s

Re: [web2py] Re: Controller to do SOAP to an action-less service, how to generate the (xml) nodes

2014-08-12 Thread Dave S
Hmmm, I'm not quite there yet. client = SoapClient( location = ws_location, action = ws_action, # SOAPAction namespace = ws_namespace, soap_ns='soap', ns = False, exceptions=True, http_headers={'Authorization': "Basic %s" % encoded}, trace=True) params = SimpleXMLEle

[web2py] Re: Record versioning without duplicate archive records?

2014-08-12 Thread Massimo Di Pierro
Please open a ticket about this. It makes sense. On Tuesday, 12 August 2014 13:41:13 UTC-5, Jack Kuan wrote: > > Hi, > > just starting out with web2py. Given a table with record versioning > enabled, I find that for every successful update operation a row will be > inserted in the archive table.

[web2py] Re: plugin_lazy_options widget

2014-08-12 Thread Jesse Ferguson
I've tried everything, I'm sure its just something easy I'm missing or its possibly just some needed javascript to trigger the ajax call. Anyone out there wanna take a look, maybe give me a hint? http://dev.s-cubism.com/plugin_lazy_options_widget -- Resources: - http://web2py.com - http://web

[web2py] Re: plugin_lazy_options widget

2014-08-12 Thread Jesse Ferguson
Here is an example of what I'm trying to do... Don't forget to install the plugins *IN CONTROLLER* def index(): form = SQLFORM(db.product) if form.accepts(request.vars, session): session.flash = 'submitted %s' % form.vars redirect(URL('index')) return dict(form=for

[web2py] question about db.mytable.update_or_insert()

2014-08-12 Thread Jack Kuan
Hi, When using update_or_insert(), say for example: db.mytable.update_or_insert(q, name='test') Let's say the query, q, results in not finding any row in mytable, is it possible that in another transaction in another request that when the same update_or_insert(...) is called that it also doe

[web2py] Re: Issue 1961; redirect, response.headers and CAS

2014-08-12 Thread Massimo Di Pierro
Looking into this but I need your help. We cannot preserve all the headers because some of them may contain sensitive information that should not be sent cross domain (for example session cookies). So the question is, which headers should be preserved by which redirects: There are two redirects

Re: [web2py] web2py grid select all filtred rows

2014-08-12 Thread Manuele Pesenti
Il 12/08/14 19:42, keiser1080 ha scritto: > Hi, > > is there a way to get the query or the list of id from a filtred grid? > > for example a grid listing all students with pagination => filter data > using the search widget of the grid student.age > 20 > => 2000 rows (multiple pages) => send d