This works indeed, and I can build an SQLTABLE based on the rows now.
Thank you.
Consequence is that SQLFORM.grid or smart grid cannot be used in this case?
(since there is no "select" statement possible, as it just takes a query?)
Op zaterdag 27 juni 2015 22:47:34 UTC+2 schreef villas:
>
> I th
db "person" with 2 fields:
db.define_table('person',
Field('firstname', type='string'),
Field('familyname', type='string'),
.
)
Need to make this table visible in SQLFORM.grid / SQLFORM.smartgrid, or
SQLTABLE based on a JOIN query:
q = ((db.person.id
Indeed, thx!
More general question: since there is no SELECT() call: how can SELECT()
arguments such as DISTINCT be applied here?
Op donderdag 25 juni 2015 05:29:32 UTC+2 schreef Michael Beller:
>
> You can pass a list of fields using the 'fields' arg of smartgrid
--
Resources:
- http://web2py
Typically, smartgrid takes a query as argument.
But what if that query is the result of a join where some fields may not be
displayed in the smart grid?
Example:
q = ((db.t1.f1 == db.t2.f21) & (db.t2.f22 == db.t3.f3))
grid=SQLFORM.smartgrid(db.t1, constraints = dict(t1=query))
return locals()
Interesting indeed, this solves my similar problem as well,
but how can I force 'distinct=True' in this context?
'distinct' would be specified in a select() statement, but that cannot be
done here?
Context: I have a complex query combining 3 tables with joins, but I only
want to show the fields
I have the same issue
So what did you do about this?
Thx
Davy
Op maandag 13 augustus 2012 12:53:10 UTC+2 schreef Jaymin Oh:
>
> I just found by myself.
>
> populate method in db.py doesn't support in GAE.
>
> On Thursday, September 29, 2011 6:52:16 PM UTC+9, glomde wrote:
>>
>> Hi,
>>
>> I am t
:(
DJ
When I use a
Op dinsdag 25 februari 2014 21:55:42 UTC+1 schreef Davy Jacops:
>
> My web2py app is ready, and I was about to deploy, but
> just found out it doesn't work at al under Internet Explorer 11!
>
> I developed everything using safari, chrome & als
UTC+1 schreef Davy Jacops:
>
> My web2py app is ready, and I was about to deploy, but
> just found out it doesn't work at al under Internet Explorer 11!
>
> I developed everything using safari, chrome & also tested in firefox.
> All working fine.
>
>
Seems other users with Safari have a similar problem with my form, so
possibly this is not browser related.
Maybe some cookie / authentication issue is in play here?
Op dinsdag 25 februari 2014 21:55:42 UTC+1 schreef Davy Jacops:
>
> My web2py app is ready, and I was about to deplo
My web2py app is ready, and I was about to deploy, but
just found out it doesn't work at al under Internet Explorer 11!
I developed everything using safari, chrome & also tested in firefox.
All working fine.
But I have a form (generated via SQLFORM.factory) with a submit button.
Using IE11:
def reserve():
> db.reservations.PersonName = session.PersonName
> form = SQLFORM(db.reservations)
> if form.process().accepted:
> session.PersonName = form.vars.PersonName
> return dict(form=form)
>
>
> On Friday, 24 January 2014 23:47:08 UTC-6
In web2py, making a ticket reservation form
Simplified db view:
db.define_table('shows', Field('ShowName', 'string'))
db.define_table('reservations',
Field('PersonName','string'),
Field('NbrOfTickets','integer'),
Field('show_id',db.shows))
db.
In web2py, making a ticket reservation form
Simplified db view:
db.define_table('shows', Field('ShowName', 'string'))
db.define_table('reservations',
Field('PersonName','string'),
Field('NbrOfTickets','integer'),
Field('show_id',db.shows))
db
13 matches
Mail list logo