pbs/django-cms-smartsnippets — pull request #5 by asfaltboy (2012-06-06 14:42:39+00:00)
Title: Patch to preserve template variables original order

When adding a new snippet, variable names do not stay in order. The
following variables will appear randomized:
span1,
span2,
span3,

Becomes:
span3,
span1,
span2,

This is, most commonly, not what you want, since you cannot predict in
which order the end-user will see the variable fields.

This seems to be since the method SmartSnippet.get_variables_list uses a
set type var ("result") to collect unique variables from the template
before returning them.

I purpose a fix where a list is used ("result = list()") and on each
append of a variable it is checked against existing variables in list.