4 ms·
From the comments: > The biggest issue I have is that model syncing fails > silently (it's as if the app doesn't exist) if an > import in the app models file
by recurser 17y ago
From the comments:
> The biggest issue I have is that model syncing fails
> silently (it's as if the app doesn't exist) if an
> import in the app models file dies with an exception
> (for instance, not found).
I've wasted hours trying to figure out those kinds of silent failures... it's not much fun. Another one that stopped me in my tracks for about an hour is that an app must have a models.py file to run unit tests, even if your application doesn't have any models. If it's not there, instead of just saying 'models.py not found' it says something like 'application <your app name> could not be found'. As others have said though, I guess that's the price you pay for the luxury of having a framework to do the low-level dirty work for you.
- kingkilr 17y agoI don't consider the tests.py issue to be "part of using a framework" its just as bug. However solving the problem properly is a harder problem (right ow djangos app cache is a part of the orm, the right fix is to have a real app cache that doesn't kow about models, ad let the orm have its ow cache that just deals with models).