[web2py] Re: A schedule automatic delete from Database

2019-06-10 Thread mostwanted
I am yet to understand how the scheduler works. Thanks Dave On Monday, June 10, 2019 at 9:59:04 PM UTC+2, Dave S wrote: > > > > On Saturday, June 8, 2019 at 11:47:47 PM UTC-7, mostwanted wrote: >> >> Is there a way to schedule an automatic deleting of content from database >> on a specified date

[web2py] Re: Form and insertion.

2019-06-10 Thread Dave S
On Monday, June 10, 2019 at 4:11:25 PM UTC-7, Quang Lam wrote: > > Hi Dave, if i set the mode field to readable false and writable true, how > i can display the mode field in the view page. i know we can make it > temporarily readable true but i dont know how. > Please help. > > I'm going to w

[web2py] Re: Form and insertion.

2019-06-10 Thread Quang Lam
Hi Dave, if i set the mode field to readable false and writable true, how i can display the mode field in the view page. i know we can make it temporarily readable true but i dont know how. Please help. On Monday, June 10, 2019 at 3:54:33 PM UTC-7, Dave S wrote: > > > > On Monday, June 10, 2019

[web2py] Re: Form and insertion.

2019-06-10 Thread Quang Lam
Hi Dave, the script is run from modules folder. i planned to use the function 'onvalidation' in the form.process ().accepted but i am wondering if i can access the mode field by using form.vars.mode since i set the mode field to writable false in the table to prevent the user input for the mode

[web2py] Re: Form and insertion.

2019-06-10 Thread Dave S
On Monday, June 10, 2019 at 3:38:09 PM UTC-7, Quang Lam wrote: > > Hi, but the things is i set the mode field to writable false, do you think > i am still able to access the mode by form.vars.mode? > If "the other script" runs server-side, it doesn't matter (but you won't be able to update the

[web2py] Re: Form and insertion.

2019-06-10 Thread Quang Lam
Hi, but the things is i set the mode field to writable false, do you think i am still able to access the mode by form.vars.mode? On Monday, June 10, 2019 at 2:52:05 PM UTC-7, 黄祥 wrote: > > another way around perhaps can use onvalidation to insert the mode data at > the same time when the user cl

[web2py] Re: Form and insertion.

2019-06-10 Thread Dave S
On Monday, June 10, 2019 at 3:15:11 PM UTC-7, Quang Lam wrote: > > Hi Dave, could you please elaborate more since the book doesn't explain my > situation well. > Thanks > Hmmm, does that "other script" run server-side or client-side? I forgot about that question. /dps > > On Monday, J

[web2py] Re: Form and insertion.

2019-06-10 Thread Quang Lam
Hi Dave, could you please elaborate more since the book doesn't explain my situation well. Thanks On Monday, June 10, 2019 at 2:23:33 PM UTC-7, Dave S wrote: > > > > On Monday, June 10, 2019 at 1:04:41 PM UTC-7, Quang Lam wrote: >> >> i have this table as follows: >> db.define_table( 'Pass', Fi

Re: [web2py] Re: Problem with Import

2019-06-10 Thread Jonathan Clark
I'm not sure I can help you. You have found the problem is to do with importing psycopg2. I have a feeling I had a similar problem and I switched to pg8000 as the driver, and it just worked. pg8000 is not supposed to be reliable though for postgresql. But it worked for me. Good luck, Jonathan On

[web2py] Re: Form and insertion.

2019-06-10 Thread 黄祥
another way around perhaps can use onvalidation to insert the mode data at the same time when the user click submit ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Re: Problem with Import

2019-06-10 Thread Dave S
On Monday, June 10, 2019 at 2:31:33 PM UTC-7, Quang Lam wrote: > > Hi Johnathan, thanks for your suggestion. it's really helpful > > it turns out that the import psycopg2 in my module caused the problem. it > i take out the import psycopg2, the import module works fine. However, i > need to im

[web2py] Re: Problem with Import

2019-06-10 Thread Quang Lam
Hi Johnathan, thanks for your suggestion. it's really helpful it turns out that the import psycopg2 in my module caused the problem. it i tool the import psycopg2, the import works fine. However, i need to import psycopg2 to connect postgres database. how can i fix this situation ? Please help

[web2py] Re: Form and insertion.

2019-06-10 Thread Dave S
On Monday, June 10, 2019 at 1:04:41 PM UTC-7, Quang Lam wrote: > > i have this table as follows: > db.define_table( 'Pass', Field('FlightID', 'reference Flight', > label=T('Flight'), requires=IS_NOT_EMPTY()), > Field('AnalystID', 'reference Analyst', > label=T('

[web2py] Re: Problem with Import

2019-06-10 Thread Jonathan Clark
Hi, If you have two modules you are importing, and one works and the other doesn't, why can't you: 1) Make them both the same content and see if you can still import both or only one. If only one works, what can the difference be except the name etc. 2) If they both import ok when they have id

[web2py] Datatables serverside JSON/Ajax

2019-06-10 Thread Cristina Sig
Hello everybody, I have been struggling with this for days and I'd like some help. I'm working with DataTables plugin and I'm trying to load data related to University's careers from a database and populate the table through Ajax. The issue is that I don't much about Ajax and JSON and I got th

[web2py] Form and insertion.

2019-06-10 Thread Quang Lam
i have this table as follows: db.define_table( 'Pass', Field('FlightID', 'reference Flight', label=T('Flight'), requires=IS_NOT_EMPTY()), Field('AnalystID', 'reference Analyst', label=T('Analyst'), requires=IS_NOT_EMPTY()), Field('Typ

[web2py] Re: A schedule automatic delete from Database

2019-06-10 Thread Dave S
On Saturday, June 8, 2019 at 11:47:47 PM UTC-7, mostwanted wrote: > > Is there a way to schedule an automatic deleting of content from database > on a specified date? I have an application that I want to delete posts > when we reach specified dates. If anyone is familiar with this, your > ass

[web2py] Re: Problem with Import

2019-06-10 Thread Quang Lam
Hi Dave, i named the other modules with underscore too and it worked but i dont know why this one is not working, any other suggestion? On Friday, June 7, 2019 at 1:54:00 PM UTC-7, Dave S wrote: > > > > On Friday, June 7, 2019 at 1:24:23 PM UTC-7, Quang Lam wrote: >> >> Hi Dave >> >> i restarted

Re: [web2py] A schedule automatic delete from Database

2019-06-10 Thread Lovedie JC
Welcome On Mon, 10 Jun 2019, 17:45 mostwanted wrote: > Thanks alot @Lovedie JC, I get now, i figured out how to use it. > > On Monday, June 10, 2019 at 11:27:27 AM UTC+2, Lovedie JC wrote: >> >> Further more the request.now which works with the time the item is posted >> can also be variable wit

Re: [web2py] A schedule automatic delete from Database

2019-06-10 Thread mostwanted
Thanks alot @Lovedie JC, I get now, i figured out how to use it. On Monday, June 10, 2019 at 11:27:27 AM UTC+2, Lovedie JC wrote: > > Further more the request.now which works with the time the item is posted > can also be variable with a different dates i.e if you want an item posted > 1 week ag

[web2py] Re: Update web2py manually

2019-06-10 Thread Константин Комков
Hello! Today I can start all my apps with Microsoft-IIS/10.0, Python 3.7.3 and fdb driver. I use that web.config:

Re: [web2py] A schedule automatic delete from Database

2019-06-10 Thread Lovedie JC
Further more the request.now which works with the time the item is posted can also be variable with a different dates i.e if you want an item posted 1 week ago, you can use the datetime function to select the date one week ago and choose the date of deleting using timedelta(days =number) Regards O

Re: [web2py] A schedule automatic delete from Database

2019-06-10 Thread Lovedie JC
Is it on the same table? If yes, then you can select with the ID. In the example above the delete is for a post that has lasted one day. If for example a post lasts 3 days then timedelta(days=3), so you decide on the number of days you want for each post. On Mon, 10 Jun 2019, 12:16 mostwanted wr

Re: [web2py] A schedule automatic delete from Database

2019-06-10 Thread mostwanted
I am having a hard time figuring out how to calculate for variable number of days, in my app i list job posts which have different closing dates, what i want is for the job post to be deleted a day after its closing date. How can achieve this with your algorithm?? On Sunday, June 9, 2019 at 11: