[web2py] Create SQLFORM having one submit button for 2 distinct tables

2016-05-22 Thread Mohit Jain
Hello, I have 2 tables (ApplicationDeadline & NominationDeadline). Both of them have only 2 fields (start-time and end-time). I would like to create a form where the user can see 4 fields and only one submit button that can be used to insert new values of these fields. Only the fields that h

[web2py] Re: Create SQLFORM having one submit button for 2 distinct tables

2016-05-23 Thread Mohit Jain
nom_msg_flash = 'Nomination Period Set : '+str(form.vars.nomStart)+' to '+str(form.vars.nomEnd) elif form.vars.nomEnd: session.flash = 'Nomination Period Start-Time not specified!' redirect(URL('overall_admin','set_dea

[web2py] Re: Setting up the scheduler, and letting it run from a certain point of time

2016-05-28 Thread Mohit Jain
I am stuck with a similar situation here. I have the models/scheduler.py from gluon.scheduler import Scheduler def auto_insert(): try: db.UserLogs(user_name='temp',user_email='a...@as.com',activity='checking scheduler') return 'inserted' except: return 'failed'

[web2py] Using Scheduler to delete database rows older than a timestamp

2016-03-03 Thread Mohit Jain
Hello, I would like to know how can one delete rows from a web2py table where if a specific field (a timestamp) is older than 24hours? I would like this process to keep running in the background in fixed time-intervals (every 5 minutes or so) and delete entries from the table where this fiel