[web2py] SQL grid "edit" page not as intended

2015-11-09 Thread Carla Raquel
I'm using an SQL grid to display values from two distinct tables. This is what I have: def manageUsers(): query = (db.Extension.Person == db.auth_user.id ) grid = SQLFORM.grid(query,csv = False,paginate=25,user_signature=True) return (grid = grid) The grid shows perfectly fine with both

[web2py] request.vars and request.args

2015-11-09 Thread Laurent Lc
Hello, I d like to know why .. menu.py URL('a', 'c', 'f', args=['x', 'y'], vars=dict(z='t')) c.py len(request.args) is always empty but len (request.vars.keys()) is not empty i don 't understand thank you 4 your explanation -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Submit button inactive after displaying pdf-file with return response.stream(...

2015-11-09 Thread Anthony
On Monday, November 9, 2015 at 3:16:46 AM UTC-5, Karl Florian wrote: > > Thank you for your very good suggestions. > Here is what i tried: > Putting the script into my print_countries view worked good. > The only Thing that bothered me was that i had to click the submit Button > twice. > I see

[web2py] Re: web2py course on pluralsight

2015-11-09 Thread Carlos Zenteno
And also give the link here, so people can find it easily. http://www.pluralsight.com/courses/full-stack-web-development-python-web2py -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] search query list:reference multiple true

2015-11-09 Thread 黄祥
i have a table that have list:reference type of field. just wondering, is it possible to have search query list:reference multiple true? when i test it the form.vars value of list:reference is translate into __12__ and the query result is not shown as expected because i assume the value of

[web2py] Re: How can I improve this clunky code..!

2015-11-09 Thread Edward Shave
for anyone else like me who didn't recognize this part (f == f.referent for f in db[table_name]._references) Look up Generator Expressions -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: REST service POST responses

2015-11-09 Thread Anthony
The book is incorrect. If you want to rely on the generic.json view to generate the JSON response, then you must return a dictionary (otherwise, no view will be called, and whatever you return will be returned directly). In this case, the .validate_and_insert method returns a DAL Row object

[web2py] Re: SQL grid "edit" page not as intended

2015-11-09 Thread Anthony
What you want to do is not supported by the grid out of the box. You could hide the standard Edit button and instead create a custom button/link for editing, though you would have to write the code to generate the form interface and handle the database updates. Alternatively, you might

[web2py] Re: Submit button inactive after displaying pdf-file with return response.stream(...

2015-11-09 Thread Anthony
> > What do you mean with bei -The code isn't quit right-. > I don't have get_countries as a component inside print_countries as far as > i know. > Yes, the LOAD() helper creates a component. In your print_countries view file, you have this line:

[web2py] Re: Apache 2.4 - 403 Forbidden Issue

2015-11-09 Thread Dave S
On Sunday, November 8, 2015 at 3:15:35 PM UTC-8, Barış Güvercin wrote: > > > I deleted apache2 with all modules / config files and web2py. Then I have > installed everything. And I've followed steps > > > as

[web2py] Re: Submit button inactive after displaying pdf-file with return response.stream(...

2015-11-09 Thread Karl Florian
Hi Anthony, the form.process(session=None) solution solved my submit button Problem! What do you mean with bei -The code isn't quit right-. I don't have get_countries as a component inside print_countries as far as i know. Do i have to make a view file for the get_countries function? I am new

[web2py] Re: SQLFORM.grid: search in a list:reference field does not work

2015-11-09 Thread Dave S
On Sunday, November 8, 2015 at 10:23:36 AM UTC-8, mweissen wrote: > > I have tried it again: without any changes - now I get the correct > answers. > At this time it is not clear what has happened. > > Sorry > > Thanks for the update. Let us know if something else turns up. /dps >

Re: [web2py] Re: web2py and python3

2015-11-09 Thread Dave S
On Sunday, November 8, 2015 at 11:36:40 PM UTC-8, Remco Boerma wrote: > Many schools already teach things from a hundred years ago, let's not do > that in IT as well. > >> >>> Ah, well, General Relativity is 100 years old. Special Relativity (including E=MC^2) is slightly older. (Read that

[web2py] REST service POST responses

2015-11-09 Thread Gary Cowell
Lookint at providing simple REST API to database tables through web2py. I used this example from the book: @request.restful() def secapi(): response.view = 'generic.'+request.extension def GET(*args,**vars): patterns = 'auto' parser = db.parse_as_rest(patterns,args,vars)

Re: [web2py] SQL grid "edit" page not as intended

2015-11-09 Thread Manuele Pesenti
Il 09/11/15 15:20, Carla Raquel ha scritto: > I'm using an SQL grid to display values from two distinct tables. This > is what I have: > > | > defmanageUsers(): > > query =(db.Extension.Person==db.auth_user.id ) > grid =SQLFORM.grid(query,csv =False,paginate=25,user_signature=True) >

[web2py] How can I improve this clunky code..!

2015-11-09 Thread Edward Shave
I have some code that works but I feel my ignorance is showing... Using just a table or table-name as input my code compiles a select statement which includes all the fields in the table plus any referenced tables. >>> table.name='entry' >>> table=eval('db.'+table_name) >>>

[web2py] Re: Oracle perfomance issues with version 2.12.3

2015-11-09 Thread Gary Cowell
If it was me, I'd eneable oracle events trace and look at the plans and wait times for the two executions. There are a few ways to do this, don't know of a web2py DAL specific one, but look for This article explains. https://oracle-base.com/articles/misc/sql-trace-10046-trcsess-and-tkprof

Re: [web2py] Web2py / Pydal Time Fields

2015-11-09 Thread Manuele Pesenti
Il 05/11/15 06:53, Mark Graves ha scritto: > Hey everyone, > > I find myself in the need for microsecond level precision for time > fields where I am querying over those fields regularly. > > As I dug into pydal and web2py's internals, I noticed that it seems to > be convention that times are

[web2py] Re: Oracle perfomance issues with version 2.12.3

2015-11-09 Thread Paolo Valleri
Hi, there should be something wrong going on. As a first step, I'd write a simple query (i.e., select(db.table.ALL, limit=(0,10)) using pydal (the database abstraction layer used in web2py) and try to find out in which version has been introduced this performance issue. If you don't find a

[web2py] Re: How can I improve this clunky code..!

2015-11-09 Thread Edward Shave
Anthony, What a brilliant answer..!!! Thank you so much. -- 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

[web2py] Re: How can I improve this clunky code..!

2015-11-09 Thread Anthony
> > >>> table.name='entry' > I assume that should be "table_name". > >>> table=eval('db.'+table_name) > No need to use eval -- just do db[table_name]. > > >>> field_names=table.fields > >>> print field_names > ['id', 'txn_id', 'acc_id', 'debit', 'credit'] > No need to store field names

[web2py] Re: Submit button inactive after displaying pdf-file with return response.stream(...

2015-11-09 Thread Karl Florian
Thank you for your very good suggestions. Here is what i tried: Putting the script into my print_countries view worked good. The only Thing that bothered me was that i had to click the submit Button twice. The Problems i had using your alternative solution are best explained in my attachment.

Re: [web2py] web2py course on pluralsight

2015-11-09 Thread António Ramos
That should be advertised on web2py.com 2015-11-09 1:02 GMT+00:00 Jason Solack : > just wanted to call attention to a training on pluralsight on web2py. I > know a few people that have taken it and it gives a good introduction to > the framework. I've been using web2py for