In your view, results is a string, so {% for result in results %} will loop through each letter in the string, and {{ result.xxxx }} will not display anything because strings don't have an xxxx attribute.

I would replace that loop in the template with simply:

{{ results }}

You can simplify your view to use render instead of render_to_response. Since you have if query, you also have to set query in the else statement, otherwise you'll get a name error.