Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Sorry Clemens, I hadn't checked your link correctly, it states it clearly with pseudo code how the flags work. Thanks, Jon. if DAL.migrate_enabled and table.migrate: if DAL.fake_migrate_all or table.fake_migrate: perform fake migration else: perform migration

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Thanks Jim. Libre de virus. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Tue, Dec 8,

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jim S
I believe it will then perform the migration, but instead of running the migrations on the database, it will just update the files in /databases. -Jim On Tuesday, December 8, 2020 at 2:07:12 AM UTC-6 Jonsubs wrote: > Hi Jim, > Just one question, what happens when you set migrate=True and >

[web2py] Re: How to import 'configuration' into a module

2020-12-08 Thread Andrew Rogers
I found the answer 2 seconds after I posted the question which I did 20 minutes after looking through a lot of pages and code. from gluon.contrib.appconfig import AppConfig from gluon.tools import Auth configuration = AppConfig() On Tuesday, 8 December 2020 at 23:34:30 UTC+10 Andrew

[web2py] How to import 'configuration' into a module

2020-12-08 Thread Andrew Rogers
I want to use the auth functionality in a module. I think I need to do this: auth = Auth(db, host_names=configuration.get('host.names')) Which means I need: from gluon.tools import Auth But how do I import the 'configuration' module? I couldn't find any mention of it here:

[web2py] Digitally sign URLs

2020-12-08 Thread 'Annet' via web2py-users
In the control panel I built I use URL(..., user_signature=True) and @auth.requires_signature() to secure the urls. I the init application I built I have various links to a particular function with different combinations of args and vars. I want to limit access to that function so only the

[web2py] sessions2trash.py

2020-12-08 Thread 'Annet' via web2py-users
I used to host my web2py application at Webfaction, there I scheduled a cron job to run the sessions2trash.py script. In the end this no longer worked. Now I host my web2py application at Opalstack, and wonder how I schedule a task to run sessions2trash.py to clean up my applications. Kind

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Hi Clemens, Just some quick questions. 1) What happens with auth tables and python -S -M -P? it does not seem to create the .table files 2) Regarding migration and fake migration. I tried to summarize my understanding in the table below (use a fixed width font to see it properly). How does

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Clemens
Hello Jon, yes, this should do it. It's also fine to import an export of an existing DB. But you can just start your application, this should create the .table files at the first, I think. Regards Clemens P.S.: Concerning migrate and fake_migrate options have a look there:

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Hi Jim, Just one question, what happens when you set migrate=True and fake_migrate=True at the same time? Thanks, Jon. On Mon, Dec 7, 2020 at 8:47 PM Jim S wrote: > Can you try setting migrate=True, fake_migrate=True and > fake_migrate_all=True in the new repo? > > either that, or copy the