Open rnditdev opened 6 years ago
Thanks for the suggestion. The django template language does not allow the use of python functions in the templates: ordering must be done at the queryset level
Thank you for the correction, I see that the line to apply the shuffle (in case my suggestion is accepted) is
talks = talks.order_by('speakersuserfirst_name', 'speakersuserlast_name') should be talks = shuffle(talks)
In order to avoid statistical bias, randomize the talks before presenting them. Fundaments: https://www.surveygizmo.com/survey-blog/survey-question-order/
https://github.com/pythonitalia/conference/blob/7e5d9c462693d997e8507ee3a4c66ec5e4c0eb0e/conference/templates/conference/voting.html#L14
I think it should be enough to replace {% for t in talks %} by {% for t in shuffle(talks) %}