djangosnippets.org: Latest snippets tagged with 'hydrate'https://djangosnippets.org/tags/hydrate/2011-10-28T13:23:16-05:00Django model objects and querysets dehydration/hydration2011-10-28T13:23:16-05:00Kronuzhttps://djangosnippets.org/snippets/2584/<p>Dehydrates objects that can be dictionaries, lists or tuples containing django
model objects or django querysets. For each of those, it creates a
smaller/dehydrated version of it for saving in cache or pickling. The reverse
operation is also provided so dehydrated objects can also be re-hydrated.</p>
<p><em>Example:</em></p>
<pre><code>&gt;&gt;&gt; import ...</code></pre>
Freely redistributable