You wrote:
In [4]: query = (test2.type_marker=='object') | (test2.type_marker==None) &
(test1.type_marker=='person')
...:
In [5]: db().select(db.test.ALL)
Out[5]:
So in [5] you did not use the query definition, its db()
AND the result is 3 Rows,
it should be 2!
Thats why I asked for the q
OK, I know I can't get a sum of virtual fields, but here's what I'm trying
to do:
db.define_table(
't_periods',
Field('f_start', type='datetime', label=T('Start time')),
Field('f_end', type='datetime', label=T('End time')),
Field('f_task', type='reference t_tasks', label=T('Task')
Try something like this:
task_duration = (db.t_periods.f_end -
db.t_periods.f_start).sum().with_alias('task_duration')
results = db(query).select(db.t_tasks.f_name, task_duration,
groupby=db.t_tasks.f_name)
On Thursday, March 8, 2018 at 3:34:26 AM UTC-5, backseat wro
Record versioning uses a common filter.
Common filters do not work if you do not provide a query which is what
happens when you do:
db().select(db.test.ALL)
You need to do:
db(db.test.id > 0).select(db.test.ALL)
And then it will work. Note that the calling the DAL without a query
shortcut is
On Thursday, March 8, 2018 at 10:28:38 AM UTC-5, Leonel Câmara wrote:
>
> Record versioning uses a common filter.
>
> Common filters do not work if you do not provide a query which is what
> happens when you do:
>
> db().select(db.test.ALL)
>
> You need to do:
>
> db(db.test.id > 0).select(db.test
I am using web2py as REST api. The db contains of 4911 records.
When we request all records with .../default/api/Employee.json it only
returns 1000 records.
I cant understand what is wrong? Is there a limit somewhere in DAL or in
the json output?
If i select with shell db_visma(db_visma.Employee)
The "vars" argument to parse_as_rest() can include "offset" and "limit"
keys, which default to 0 and 1000, respectively.
If you want to return all records, you can add "limit" to the URL query
string:
/myapp/controller/api?limit=[very large number]
or just update the "vars" dictionary within t
Yepp, thanx. I found it in the book and changed the number in rest.py.
torsdag 8. mars 2018 17.06.49 UTC+1 skrev Anthony følgende:
>
> The "vars" argument to parse_as_rest() can include "offset" and "limit"
> keys, which default to 0 and 1000, respectively.
>
> If you want to return all records,
Thanks Anthony. It almost works (but it fails in an odd way). I was getting
some odd results, and I've narrowed it down to this:
In [10]: task_duration = (db.t_periods.f_end - db.t_periods.f_start)
In [11]: results = db(query).select(p.id, p.f_start, p.f_end, task_duration
).as_list()
In [1
Couples of folks seem to work over performance tuning right now, so I
thought bring that thread UP would give some cues
On Tue, Feb 19, 2013 at 12:02 PM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:
> Ok, find thanks for clarification.
>
> Richard
>
>
> On Tue, Feb 19, 2013 at 11:30 AM, N
Please show the source html.
--
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 subscribed to the Google Groups
"w
You can try:
task_duration = (db.t_periods.f_end.epoch() - db.t_periods.f_start.epoch()).
sum().with_alias('task_duration')
That should give you the duration in seconds, which you can then convert to
a Python timedelta object if desired.
Anthony
On Thursday, March 8, 2018 at 2:27:24 PM UTC-5,
I'm using submit buttons on forms to submit post requests to new windows,
using . The problem is, web2py automatically changes
the button text to "Working..." on the original page, after the submit
button is clicked. There are some specific buttons where I don't want this
to happen. How can I d
Nice indeed. Thanks
On Wednesday, March 7, 2018 at 3:19:14 AM UTC-8, Ramos wrote:
>
> Nice ...
> https://ponyorm.com/
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Repor
Thanks all for the replies,
I was able to go to gluon.globals and get the HTTP 400 error to show what
the problem was, turns out the request was still sending args and vars from
the previous test.
Oddly enough, clearing the request variables and arguments (setting them to
[] for instance) was
Tried today to upload a new website
https://www.text2codes.com/
and got the same link to internal error ticket.
IMHO, I think the list needs be curated the same way Massimo did with the
Web2Py consultants list a couple of years ago.
Cheers
Alex2
On Sunday, April 2, 2017 at 1:58:27 PM UTC-7, Al
As of 2018 March 31 Google doesn't support reCaptcha V1 anymore.
I thought the book should be updated with the following modification:
instead of *Recaptcha* it should be *Recaptcha2*
from gluon.tools import *Recaptcha2*
auth.settings.captcha = *Recaptcha2*(request,'PUBLIC_KEY','SECRET_KEY')
an
17 matches
Mail list logo