'Parses an expression and determines the field and filter type.'

def split_expression(self, expression):

    parts = expression.split(FILTER_SEPARATOR)
    field = parts[0]
    if ((len(parts) == 1) or (parts[(-1)] not in VALID_FILTERS)):
        filter_type = u'content'
    else:
        filter_type = parts.pop()
    return (field, filter_type)
