Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't sort keys by default in tojson when rendering profile forms
jinja2's tojson sorts keys in dicts by default. This was useful in the time when python's dicts were not ordered. However, now that dicts are ordered in python, this screws it up. Since profiles are dicts, ordering *does* matter - they should be displayed to the user in the order that the admin sets them. This allows template writers to use `|tojson` on the profile_list (to be read by JS) without worrying about ordering getting mangled. Template writers can still sort keys by explicitly using `|dictsort` in their template
- Loading branch information