#21459 closed New feature (wontfix)
Allow easy reload of appcache.
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Cache system) | Version: | 1.6 |
Severity: | Normal | Keywords: | interactive, models |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I need to work interactively with my Django models, and I think there should be a easier way to reload the models modules that this fancy stuff:
http://stackoverflow.com/questions/890924/how-do-you-reload-a-django-model-module-using-the-interactive-interpreter-via-m
Change History (2)
follow-up: 2 comment:1 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Replying to 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.
See #3591 for more issues into that direction; supporting
reload()
might be a nice side-effect, but imo not worth any effort.