django-haystack
django-haystack copied to clipboard
how to dynamically assign column-name to auto complete function?
I want to do like something info=SearchQuerySet().autocomplete(col_name[0]="abc") But when I do this it gives error "SyntaxError: keyword can't be an expression" and if I do var=col_name[0] and then info=SearchQuerySet().autocomplete(var="abc") it doesn't return anything.Can anyone help me to solve this issue or point out what I am doing wrong? I want dynamically assignment of column name All the field passing to the col_name[] are EdgeNgramField field.
This is a Python question, not something related to Haystack. See https://docs.python.org/2/glossary.html#term-argument for information about how to use **kwargs for this.