Moves the sorting logic into a separate method
Merge pull request #3 from caioariede/move_filter_outside_templatetags

Move the sorting logic to a separate method, so we can apply the sorting outside the template context