Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Sort HTML attributes on generated forms

  • Loading branch information...
commit 6b9f130278f98b3a15f7ad1959269c200e084f03 1 parent b9fc701
Ian Clelland authored September 27, 2012 spookylukey committed December 24, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/forms/util.py
2  django/forms/util.py
@@ -20,7 +20,7 @@ def flatatt(attrs):
20 20
 
21 21
     The result is passed through 'mark_safe'.
22 22
     """
23  
-    return format_html_join('', ' {0}="{1}"', attrs.items())
  23
+    return format_html_join('', ' {0}="{1}"', sorted(attrs.items()))
24 24
 
25 25
 @python_2_unicode_compatible
26 26
 class ErrorDict(dict):

0 notes on commit 6b9f130

Please sign in to comment.
Something went wrong with that request. Please try again.