[web2py] Re: Legacy table with reserved keyword in column name

2017-10-26 Thread Val K
Hi this should help: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Reserved-keywords I think check_reserved=['common'] will solve the problem On Thursday, October 26, 2017 at 10:56:45 PM UTC+3, Fabiano Almeida wrote: > > Hi! > > How to put in the DAL a legacy

[web2py] Legacy table with reserved keyword in column name

2017-10-26 Thread Fabiano Almeida
Hi! How to put in the DAL a legacy table whose column name matches reserved SQL words? Traceback: SyntaxError: invalid table/column name "Message" is a "ALL" reserved SQL/NOSQL keywor thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: How to get the last few records except the last record

2017-10-26 Thread Anthony
There's no need to select the extra record and then drop it via Python. Instead you can just change the range of the limitby tuple to get exactly the records you want. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: How to get the last few records except the last record

2017-10-26 Thread Maurice Waka
Works well. Great! On 26 Oct 2017 9:31 AM, "sesenmaister" wrote: > records = db(db.post.author == auth.user_id).select(orderby=(db.post.ALL, > limitby=(0,10))*[:-1]* > > On Thursday, October 26, 2017 at 7:03:00 AM UTC+2, Maurice Waka wrote: >> >> If using the code:

Re: [web2py] Re: Update database (multiple tables) with CSV in sequence

2017-10-26 Thread 'Matthew J Watts' via web2py-users
great, thanks for your help Dave. I'll have a go and if i have any luck will post my code for future reference On Mon, Oct 23, 2017 at 10:02 PM, Dave S wrote: > > > On Saturday, October 21, 2017 at 2:25:47 PM UTC-7, Matthew J Watts wrote: >> >> Hi all >> >> I'm pretty new

Re: [web2py] Re: to be or not to be... run by scheduler

2017-10-26 Thread Manuele Pesenti
It seams that the parameter request.is_scheduler is always set to false on my colleague windows system could it be a possible bug? Any other experience?     M. On 20/10/2017 17:20, Anthony wrote: If it is a scheduler execution, request.is_scheduler will be True. Anthony -- Resources: -

[web2py] Re: How to get the last few records except the last record

2017-10-26 Thread sesenmaister
records = db(db.post.author == auth.user_id).select(orderby=(db.post.ALL, limitby=(0,10))*[:-1]* On Thursday, October 26, 2017 at 7:03:00 AM UTC+2, Maurice Waka wrote: > > If using the code: limitby=(0,10) am able to get the last 10 records, Is > there a way to get the same(last few records)

[web2py] Re: do LOAD statements work in layout.html?

2017-10-26 Thread Dave S
On Wednesday, October 25, 2017 at 3:55:13 PM UTC-7, Dave S wrote: > > Last night, I thought I had it working. Today it doesn't seem to be. > > (I wanted to have a blurb on the page, and also be able to show the blurb > as an specific page). > > The specific page still works, using blurb.html,