newforms ModelChoiceField should not cache choices
|Reported by:||Adrian Holovaty||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
ModelMultipleChoiceField cache the output of their
queryset the first time
self.choices is accessed. This is bad for long-running processes, such as mod_python, because the cache gets stale. Plus, it's bad saving all of those choices in memory. The attached unit tests illustrate the problem.