mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
[1.5.x] Sort HTML attributes on generated forms
Backport of 6b9f130278 from master
This commit is contained in:
@@ -20,7 +20,7 @@ def flatatt(attrs):
|
|||||||
|
|
||||||
The result is passed through 'mark_safe'.
|
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
|
@python_2_unicode_compatible
|
||||||
class ErrorDict(dict):
|
class ErrorDict(dict):
|
||||||
|
|||||||
Reference in New Issue
Block a user