Re: execute code at startup

2016-03-09 Thread Vernon D. Cole
I think if I were doing this, I would write a custom management command to update the tables, and run it at system startup time. Management commands are easy to debug and well documented. On Tuesday, March 8, 2016 at 10:3

execute code at startup

2016-03-08 Thread Julien Greard
Hello, I am using Django 1.9.3. I have a project with several apps. I would like to update the tables of one of the app at the startup of the project. I have all the code written, it looks like the following (it's an example): from my_app.models import My_table def on_startup(): my_thread