[web2py] License expiry date management

2018-04-11 Thread Prabhakar Shanmugam
Dear All, I have just started learning web2py and I have hands on in python. Please just give some pointers. Iam sure this might be a trivial question, but I thought during the learning process I will ask this trivial question. I was seeing if i can write a license expiry daet management app,

Re: [web2py] License expiry date management

2018-04-11 Thread Anthony
And if you need that to happen automatically on a regular schedule, you can use the web2py scheduler: http://web2py.com/books/default/chapter/29/04/the-core#web2py-Scheduler. Anthony On Wednesday, April 11, 2018 at 10:52:03 AM UTC-4, Richard wrote: > > Something like that : > >

Re: [web2py] How to retrieve info about sessions when they are stored in Redis?

2018-04-11 Thread Richard Vézina
I gave a look directly in the redis shell redis-cli -h localhost -p 6379 -a PASSWORD_IF_YOU_SET_ONE It appears that each session store will have a different key which goes like that : w2p:sess:APP_NAME:SOME_ID And w2p:sess:APP_NAME:id_idx will contains a set of each unique session existings, so

Re: [web2py] License expiry date management

2018-04-11 Thread Richard Vézina
Something like that : next_week_sunday_date = \ (request.now.date() + datetime.timedelta(days=7)) + datetime.timedelta(days=6 - request.now.weekday()) rows_with_records_of_software_license_that_will_end_the_next_sunday = db(db.table_name.field_date_name == next_week_sunday_date

[web2py] Reverse relationships

2018-04-11 Thread pbreit
It's interesting that Rails & Django have a reverse relationship concept but Web2py apparently does not. Whenever I run into this in the various Rails/Django tutorials I don't understand it and find it confusing. Is that another instance where Massimo spared us from unnecessary complexity? --

Re: [web2py] Reverse relationships

2018-04-11 Thread Richard Vézina
I think it coming from DAL vs ORM. :) Richard On Wed, Apr 11, 2018 at 2:13 PM, pbreit wrote: > It's interesting that Rails & Django have a reverse relationship concept > but Web2py apparently does not. Whenever I run into this in the various > Rails/Django tutorials I

Re: [web2py] Re: Confused about web2py sessions handling in the filesystem, versus the db handling.

2018-04-11 Thread AlighaThor
Sorry for my delay. Thanks both Anthony and Richard for your excellent explanations! Well, I changed for now to DB sessions. The settings mentioned by Anthony about renewing sessions are great, I did'nt know that. Anyway I still found that DB handling is by far easier/scalable/performant to

[web2py] Strange behaviour between two grids and different Bootstrap versions

2018-04-11 Thread greenpoise
So, I have this two applications with different bootstrap versions. One is older version with Bootstrap 3 and the grid works perfectly. I am able to view and edit the item and it takes me back to the grid. Meanwhile the new version, Bootstrap4, I click on Edit for a specific item and I edit a

[web2py] Re: Strange behaviour in grid with computed field

2018-04-11 Thread greenpoise
I wish I could change the main subject for this. I just realized is my computed field. I believe this use to work before. Field('description',compute=lambda r: r['seriesname']+" "+r['color']+" "+r[ 'tilesize']), Like I wrote before, when I edit the record, it does not take me back to the grid

Re: [web2py] Re: Confused about web2py sessions handling in the filesystem, versus the db handling.

2018-04-11 Thread Anthony
> > About locking sessions, I see there is a "locked" boolean field in the > sessions table. What's stands for? I mean, I expect that it has something > to do with sessions locking, but when and where it is triggered? > As far as I can tell, that field is not actually used for anything. Maybe