[web2py] How to do I stop auth.requires_login() from redirecting to the default/user controller?

2019-05-10 Thread Melody Daniel
My app consists of two sides, the public side(default/index) accessible to anyone from anywhere and the private side(admin/index) accessible to only administrators. I moved the function responsible for authentication from the 'default.py' controller to the 'admin.py' as the public side requires

[web2py] web2py sqlite3 FOREIGN KEY constraint failed

2018-09-02 Thread Melody Daniel
Hi, I have been fighting this error for a longtime, I can't seem to find out where this error is coming from. MY MODEL db.define_table('discussion',Field('title','string',requires = (IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'discussion.title'))), Field('post','text',requires = IS_NOT_EMPTY()), auth.sign