def check_boolean_field_default_value():
 fields = []
 for cls in models.get_models():
  opts = cls._meta
  for f in opts.local_fields:
   if (isinstance(f, models.BooleanField) and (not f.has_default())):
    fields.append((u'%s.%s: "%s"' % (opts.app_label, opts.object_name, f.name)))
 if fields:
  fieldnames = u', '.join(fields)
  message = [u'You have not set a default value for one or more BooleanFields:', (u'%s.' % fieldnames), u'In Django 1.6 the default value of BooleanField was changed from', u"False to Null when Field.default isn't defined. See", u'https://docs.djangoproject.com/en/1.6/ref/models/fields/#booleanfield', u'for more information.']
  return u' '.join(message)

def check_boolean_field_default_value ( ) : fields = [ ] for cls in models . get_models ( ) : opts = cls . _meta for f in opts . local_fields : if ( isinstance ( f , models . BooleanField ) and ( not f . has_default ( ) ) ) : fields . append ( ( u'%s.%s: "%s"' % ( opts . app_label , opts . object_name , f . name ) ) ) if fields : fieldnames = u', ' . join ( fields ) message = [ u'You have not set a default value for one or more BooleanFields:' , ( u'%s.' % fieldnames ) , u'In Django 1.6 the default value of BooleanField was changed from' , u"False to Null when Field.default isn't defined. See" , u'https://docs.djangoproject.com/en/1.6/ref/models/fields/#booleanfield' , u'for more information.' ] return u' ' . join ( message )
checks if there are any booleanfields without a default value .