|
@@ -1,5 +1,7 @@
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
+import warnings
|
|
|
+
|
|
|
from django.conf import settings
|
|
|
from django.utils.html import format_html, format_html_join
|
|
|
from django.utils.encoding import force_text, python_2_unicode_compatible
|
|
@@ -21,6 +23,11 @@ def flatatt(attrs):
|
|
|
|
|
|
The result is passed through 'mark_safe'.
|
|
|
"""
|
|
|
+ if [v for v in attrs.values() if v is True or v is False]:
|
|
|
+ warnings.warn(
|
|
|
+ 'The meaning of boolean values for widget attributes will change in Django 1.8',
|
|
|
+ DeprecationWarning
|
|
|
+ )
|
|
|
return format_html_join('', ' {0}="{1}"', sorted(attrs.items()))
|
|
|
|
|
|
@python_2_unicode_compatible
|