Re: AppConfig where to execute initialization queries?

2014-10-22 Thread Oliver George
Did you find a good solution for this? On Monday, October 6, 2014 11:56:15 PM UTC+11, Marc Aymerich wrote: > > Hi, > I have been bitten by unexpected behaviors when running tests because on > AppConfig.ready() I was initializing some stuff that depends on DB stored > data. Reading the django

Re: AppConfig where to execute initialization queries?

2014-10-07 Thread Collin Anderson
Could you somehow lazy initialize? Somehow auto-initialize things the first time they are called for? The other, kind of hacky place to do it is at the top of your urls.py, which should run on the first request. -- You received this message because you are subscribed to the Google Groups

AppConfig where to execute initialization queries?

2014-10-06 Thread Marc Aymerich
Hi, I have been bitten by unexpected behaviors when running tests because on AppConfig.ready() I was initializing some stuff that depends on DB stored data. Reading the django docs I've found a warning that specifically suggests not to do this [1]. But then I wonder where this kind of