[web2py] Web2py request different behavior on local and online version (server code executes, but returns 404

2016-08-16 Thread Ur. Kr.
On my local version of the application, making the request with the following code, executes the code on the server, returning successfully. $.ajax({ type: 'POST', url: "{{=URL('default', 'serverFunction.json')}}", data: {id: id}}); However, if I make the request like so (without '.json'

[web2py] Cross-domain authentication for REST api

2017-03-28 Thread Ur. Kr.
We need to make a REST api service for our website that will be accessed from arbitrary domains by partner companies, but we're having trouble with authentication. We tried auth.is_logged_in(), but the problem is that login doesn't seem to work cross domain. A session is created on the server,

[web2py] Re: Is it possible to trigger some action on error?

2018-06-03 Thread Ur. Kr.
r (see > http://web2py.com/books/default/chapter/29/04/the-core#Routes-on-error) > and have it take whatever action is desired before returning a response. > > Anthony > > On Sunday, June 3, 2018 at 9:15:04 AM UTC-4, Ur. Kr. wrote: >> >> Is it possible to trigger so

[web2py] Is it possible to trigger some action on error?

2018-06-03 Thread Ur. Kr.
Is it possible to trigger some action when an error occurs? When an error file is added to the errors folder. -- 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

[web2py] Re: How to force an update to the scheduler schema

2018-07-25 Thread Ur. Kr.
scheduler = Scheduler(db, migrate=True) Doesn't recreate tables for me when I rerun the scheduler. On Tuesday, May 23, 2017 at 8:03:13 PM UTC+2, Dave S wrote: > > > > On Tuesday, May 23, 2017 at 5:30:08 AM UTC-7, Brad Miller wrote: >> >> Due to a forced migration to new hardware/os on

[web2py] Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Ur. Kr.
scheduler = Scheduler(db, migrate=True) This doesn't recreate tables for me when I rerun the scheduler and the application. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Ur. Kr.
UTC-4, Ur. Kr. wrote: >> >> >> scheduler = Scheduler(db, migrate=True) >> This doesn't recreate tables for me when I rerun the scheduler and the >> application. >> > > Have the tables already been created once? If so, they will not be > re-created. W

[web2py] Re: Scheduler migrate=True doesn't recreate tables

2018-07-25 Thread Ur. Kr.
Web2py\gluon\scheduler.py The commit under the if around line 878 does run. On Wednesday, July 25, 2018 at 9:19:33 PM UTC+2, Ur. Kr. wrote: > > I have dropped the tables relating to the scheduler from the old database > because I moved to a newer version of web2py. I want the

[web2py] How to serve same view for multiple urls

2018-03-15 Thread Ur. Kr.
If you want to convert part of a web2py app into an SPA with client-side routing, how do you make web2py serve the same view for multiple urls? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: How to serve same view for multiple urls

2018-03-15 Thread Ur. Kr.
Would also need a way to redirect to "index" controller instead of getting "invalid controller" when navigating to a URL without a controller. On Thursday, March 15, 2018 at 11:28:33 AM UTC+1, Ur. Kr. wrote: > > If you want to convert part of a web2py app into an SPA w

Re: [web2py] Re: How to serve same view for multiple urls

2018-03-15 Thread Ur. Kr.
vascript based. > > Take a look on discussions on Vue.js > > On Thu, Mar 15, 2018 at 11:53 AM, Ur. Kr. <urban@gmail.com > > wrote: > >> Would also need a way to redirect to "index" controller instead of >> getting "invalid controller" when navigating

[web2py] pg8000.errors.ProgrammingError 'no result set' when querying database from module

2019-01-01 Thread Ur. Kr.
Web2py version: Version 2.8.2-stable+timestamp.2013.11.28.07.51.37 in a module, I'm setting up a db object like so: from gluon import current db = current.globalenv['db'] But when I try whatever query the database inside that module, I get an error:

[web2py] Migration not creating new fields/tables after restore from an old backup the database

2019-07-31 Thread Ur. Kr.
This are my migration settings: DAL(settings.database_uri, migrate=True, fake_migrate_all=True) When I add new tables of fields on the development version of the app they are added properly. However, if I create a backup of the production database (missing the newly added fields/tables) and I