[Answered ]-An alternative to cache_choices in django 1.8.1 to get rid of RemovedDjango1.9 cache_choices deprecation warning in forms

2👍

It may not be the answer you were looking for but it looks like there isn’t an alternative.

From the deprecation ticket:

The current implementation of cache_choices is pretty useless as it does not share between multiple forms, only between multiple renderings of the same form object. This is because of how we copy fields when moving from form.base_fields to form.fields. As such, cache_choices as is should be removed.

So unless you were rendering the same form object multiple times, it looks as though it might not have been doing what you wanted anyway.

👤Sayse

Leave a comment