[web2py] Re: Searching by date using SQLFORM.factory

2020-02-19 Thread Alex Beskopilny
import cPickle, os def put_on_disk(file_name, data): uploadfolder=os.path.join(request.folder, 'uploads') fn = os.path.join(uploadfolder, file_name) out_file = open(fn, 'w') cPickle.dump(data, out_file) out_file.close() def get_from_disk(file_name):

[web2py] Re: Searching by date using SQLFORM.factory

2020-02-19 Thread mostwanted
I have decided to make rows a session variable but I am not sure if this is a good idea! def search(): form = SQLFORM.factory( Field("start_date", type="date"), Field("end_date", type="date")) if form.process().accepted: q = ((db.birthdays.bornday >= form.vars.start_date)

[web2py] Re: Searching by date using SQLFORM.factory

2020-02-19 Thread mostwanted
I figured it out, initially I was getting an error, it told me that I can not split the date, then i did this: def search(): form = SQLFORM.factory( Field("start_date", type="date"), Field("end_date", type="date")) if form.process().accepted: q = ((db.birthdays.bornday >=

[web2py] Re: Searching by date using SQLFORM.factory

2020-02-19 Thread Clemens
Hi, is your problem receiving no result or the wrong result? How is the table definition of your birthday table and why is the birthday not just a field a corresponding person table? Best regards Clemens On Wednesday, February 19, 2020 at 10:49:11 PM UTC+1, mostwanted wrote: > > I'm trying