Fixed %-bug
We are now escaping the query with django queryset instead of psycopg