Permalink
Browse files

Sort HTML attributes on generated forms

  • Loading branch information...
1 parent b9fc701 commit 6b9f130278f98b3a15f7ad1959269c200e084f03 @clelland clelland committed with spookylukey Sep 28, 2012
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):

0 comments on commit 6b9f130

Please sign in to comment.