[extensions-web/django/upgrade-1.8] html: boolean attribute value should be empty or equal attr's name.



commit c35fc844d10a94f242ac7de0a05c0c72494104b5
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Tue Oct 25 23:23:17 2016 +0300

    html: boolean attribute value should be empty or equal attr's name.
    
    https://html.spec.whatwg.org/multipage/infrastructure.html#boolean-attributes

 sweettooth/auth/forms.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/auth/forms.py b/sweettooth/auth/forms.py
index ea3ff4b..373a9ab 100644
--- a/sweettooth/auth/forms.py
+++ b/sweettooth/auth/forms.py
@@ -17,7 +17,7 @@ class AutoFocusForm(object):
     def __init__(self, *a, **kw):
         super(AutoFocusForm, self).__init__(*a, **kw)
         for field in self.fields:
-            self.fields[field].widget.attrs['autofocus'] = True
+            self.fields[field].widget.attrs['autofocus'] = 'autofocus'
             break
 
 class InlineForm(object):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]