def as_sql(self):
    '\n        Creates the SQL for this query. Returns the SQL string and list of\n        parameters.\n        '
    assert (len([t for t in self.query.tables if (self.query.alias_refcount[t] > 0)]) == 1), 'Can only delete from one table at a time.'
    qn = self.quote_name_unless_alias
    result = [('DELETE FROM %s' % qn(self.query.tables[0]))]
    (where, params) = self.compile(self.query.where)
    if where:
        result.append(('WHERE %s' % where))
    return (' '.join(result), tuple(params))
Creates the SQL for this query. Returns the SQL string and list of
parameters.
def as_sql(self):
    '\n        Creates the SQL for this query. Returns the SQL string and list of\n        parameters.\n        '
    assert (len([t for t in self.query.tables if (self.query.alias_refcount[t] > 0)]) == 1), 'Can only delete from one table at a time.'
    qn = self.quote_name_unless_alias
    result = [('DELETE FROM %s' % qn(self.query.tables[0]))]
    (where, params) = self.compile(self.query.where)
    if where:
        result.append(('WHERE %s' % where))
    return (' '.join(result), tuple(params))