--
Ticket URL: <https://code.djangoproject.com/ticket/21459>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_docs: => 0
* resolution: => wontfix
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
See #3591 for more issues into that direction; supporting `reload()` might
be a nice side-effect, but imo not worth any effort.
--
Ticket URL: <https://code.djangoproject.com/ticket/21459#comment:1>
Comment (by danpetrikin):
Replying to [comment:1 apollo13]:
> See #3591 for more issues into that direction; supporting `reload()`
might be a nice side-effect, but imo not worth any effort.
I'd like to know details as to why this isn't worth any effort.
Models in modern software are getting defined more frequently at runtime.
It's been quite a pain researching how I tell Django that "my model
definition has changed, please reload the model definition"
Simple python reloads have not sufficed nor has working with the available
information on appcache. Unless I'm just incredibly stupid, which I never
rule out as a possibility, I don't see any information within the
documentation on AppCache or how it gets loaded.
Granted, I am using a fork of Django that supports nosql, and am defining
models on the fly based on values of other models. However, I can easily
see a similar use case for anyone who wants to automate migrations and run
them based on other model changes, still supporting dynamic models
(although it'd probably crush performance on a traditional SQL DB).
Without ease of access to model reloads within the Django framework, truly
sophisticated systems that are programmed to respond to their own internal
data states with additional logic must come up with their own solutions.
I'm sorry if I seem like an edge case, but I have a feeling in the coming
years runtime generated, and altered, model definitions will become a far
more standard need within the industry.
--
Ticket URL: <https://code.djangoproject.com/ticket/21459#comment:2>