Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.5.x] Sort HTML attributes on generated forms

Backport of 6b9f130 from master
  • Loading branch information...
commit 5f07d24eaaa4879d90db6d7b4085cd6238042bd0 1 parent cade340
@clelland clelland authored spookylukey committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/forms/util.py
View
2  django/forms/util.py
@@ -20,7 +20,7 @@ def flatatt(attrs):
The result is passed through 'mark_safe'.
"""
- return format_html_join('', ' {0}="{1}"', attrs.items())
+ return format_html_join('', ' {0}="{1}"', sorted(attrs.items()))
@python_2_unicode_compatible
class ErrorDict(dict):
Please sign in to comment.
Something went wrong with that request. Please try again.