1👍
✅
I ended up hanging my data off of the Django AppConfig object, specifically the ready method.
Others also seem to do this, for example here. That example didn’t use the ready method, but it did use AppConfig.
0👍
Depending on the object you want to store you need to pickle and unpickle. But this is not a performance issue. You have two possibilities, if it is a dict you can use a JSON structure otherwise just use django-redis
as cache backend and let django store the object in the cache (redis). Django-redis
supports also connection pooling.
- [Answered ]-Writing to SQL yields different results with shell / django
- [Answered ]-Django – how to pass object to ModelForm via UpdateView?
Source:stackexchange.com