djangosnippets.org: Latest snippets tagged with 'shuffle'http://djangosnippets.org/tags/shuffle/2011-02-25T09:59:08.176364-06:00shuffle templatetag
2011-02-25T09:59:08.176364-06:00deanmalmgrenhttp://djangosnippets.org/snippets/2370/<p>This is useful for randomizing an iterable of objects in place in a django template. Usage:
</p>
<pre><code>{% load shuffle %}
{# now some_list is ordered #}
{% shuffle some_list %}
{# now some_list is randomized #}
</code></pre>
Freely redistributableReal shuffle function
2010-05-20T17:30:38.895083-05:00marinhohttp://djangosnippets.org/snippets/2030/<p>This function solve the issue of random.shuffle that is based only on randomized shuffling (that's not a real shuffling, because many times items returned aren't shuffled enough).</p>
<p>This function make a randomized shuffle and after this loops long the list resorting to avoid two items with a same value in …</p>
Freely redistributable