Opened 23 months ago

Closed 23 months ago

Last modified 8 months ago

#21459 closed New feature (wontfix)

Allow easy reload of appcache.

Reported by: zaharid@… 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


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:

Change History (2)

comment:1 follow-up: Changed 23 months ago by apollo13

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

See #3591 for more issues into that direction; supporting reload() might be a nice side-effect, but imo not worth any effort.

comment:2 in reply to: ↑ 1 Changed 8 months ago by danpetrikin

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.

Note: See TracTickets for help on using tickets.
Back to Top