Re: Models.py not loaded at server startup ?????

2012-09-02 Thread Russell Keith-Magee
… and this is exactly why the app-refactor has been a topic of discussion for several years. Hopefully we'll get a chance to thrash out some of the details this week at DjangoCon US; I know Preston (who has been working on the patch of late) is keen to discuss what he's done. Yours, Russ Magee %-)

Re: Models.py not loaded at server startup ?????

2012-09-02 Thread Yo-Yo Ma
Another good reason for model loading at startup is a good idea; without it, models.get_models becomes a lie. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-

Re: Models.py not loaded at server startup ?????

2012-09-01 Thread Michael
Hi, Is there a "clean" solution nowadays? I am making an app that should run some specific code after the whole project is loaded. I was thinking about a thread started in the models.py file of my app that will try X times to run the code, something like that: success = False attempts = 0 while

Re: Models.py not loaded at server startup ?????

2010-12-13 Thread Pakal
I've never used these handlers yet, but from what I've browsed from django's code, it seems low level handlers have nothing to import models, so I guess the result would be the same. I guess I'll manually import all my INSTALLED_APPS models from within my settings.py or urls.py, for the moment. Bu

Re: Models.py not loaded at server startup ?????

2010-12-13 Thread Harro
Is this mod_python specific or does it also happen with mod_wsgi or gunicorn? On Dec 13, 3:47 pm, Carl Meyer wrote: > Hi, > > On Dec 12, 4:40 pm, Pakal wrote: > > > Why, then, isn't it specified that all models.py files should be > > loaded by each starting worker ? That would solve the whole pr

Re: Models.py not loaded at server startup ?????

2010-12-13 Thread Carl Meyer
Hi, On Dec 12, 4:40 pm, Pakal wrote: > Why, then, isn't it specified that all models.py files should be > loaded by each starting worker ? That would solve the whole problem > and hidden errors around startup code like signals and startup checks. This is a real issue for me as well; not necessar

Models.py not loaded at server startup ?????

2010-12-12 Thread Pakal
Hello Having spent my time developing with django's dev server, I was pretty used to having all models (re)validated when the server reloaded. However, when I connected the codebase to an apache/mod_python instance, I had the surprise of seeing the miscellaneous models.py INSTALLED_APPS didn't ge