code: def _get_default_value(self, value):
          
          if isinstance(value, QueryExpression):
              return value
  
          if isinstance(value, bool):
              return "'%s'" % int(value)
  
          return "'%s'" % value
docs: Format a value so that it can be used in "default" clauses.