[web2py] Re: A calculation gives unsupported operand type(s) for -: 'str' and 'str'

2019-08-13 Thread Dave S
On Tuesday, August 13, 2019 at 10:12:07 AM UTC-7, mostwanted wrote: > > My understanding of the error is that i can not subtract strings, which is > true, but these fiends on which i am performing subtraction are dates and i > was trying to pick their days when i put them into* ().days *so

[web2py] Re: Accessing some sum

2019-08-13 Thread Val K
https://github.com/web2py/pydal/issues/388 -- 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

[web2py] Re: Accessing some sum

2019-08-13 Thread Val K
I saw in some post that implicit query like db() with no args is not supported now -- 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

[web2py] Re: No being able to access all the details from a for loop in the view

2019-08-13 Thread mostwanted
Thanks for your input @villas but i can't change the link to an id because it already has a class is called *whatsapp *which is the one i am calling on the *click *function > try: > > $(document).on("click", '#whatsapp', function(e) { > > > > On Tuesday, 13 August 2019 06:46:02 UTC+1, mostwanted

[web2py] Re: A calculation gives unsupported operand type(s) for -: 'str' and 'str'

2019-08-13 Thread mostwanted
My understanding of the error is that i can not subtract strings, which is true, but these fiends on which i am performing subtraction are dates and i was trying to pick their days when i put them into* ().days *so they wont be treated as strings because they are date fields, i cant figure out

[web2py] Re: No being able to access all the details from a for loop in the view

2019-08-13 Thread villas
Not sure, but maybe it is because you are using a class selector instead of id. In place of: $(document).on("click", '.whatsapp', function(e) { try: $(document).on("click", '#whatsapp', function(e) { On Tuesday, 13 August 2019 06:46:02 UTC+1, mostwanted wrote: > > I am working on a

[web2py] Re: A calculation gives unsupported operand type(s) for -: 'str' and 'str'

2019-08-13 Thread villas
Check in DB what kind of field is '*daysLoaned*'. Maybe it is defined as a Str field? Try: Field('daysLoaned', compute=lambda r: str(r['returning_date']-r['loaning_date']).days) Just an idea... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] A calculation gives unsupported operand type(s) for -: 'str' and 'str'

2019-08-13 Thread mostwanted
I am trying to calculate the number of days and use that value in another calculation in my database. I used this method below which used to to work perfectly but todays its giving me an error db.define_table('invoice', Field('loaning_date', 'date', label=SPAN('Date Loaned',

[web2py] Re: What happened to DAL(None)?

2019-08-13 Thread p a
Thanks, Leonel. It wasn't just the validators, I was building queries and doing selects and all, and it has worked for years. But I just adapted my code, no big deal. Your link helped. Have a nice day. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Post SQLing

2019-08-13 Thread Dave S
On Tuesday, May 21, 2019 at 6:19:38 PM UTC-7, Dave S wrote: > > I've got my AWS linux system ticking along nicely with my heavy table > under PostGres [1], but I still have uploads, Auth, and Scheduler under > sqlite. I'd like to move them to PostGres, so I'm double checking that I'm > using

[web2py] Re: Accessing some sum

2019-08-13 Thread Dave S
On Saturday, August 3, 2019 at 2:47:57 AM UTC-7, Val K wrote: > > Try db(db.test1).select(sum) On hold for the moment, but on another machine I have code that uses the book example, so I must have done something wrong on this machine. /dps -- Resources: - http://web2py.com -