Currently I am attempting to search a database to grab certain events. My query is as such
SELECT * FROM events WHERE summary ILIKE E\'%test%\' AND start_tim
Not sure if this is the full root of your problem, but I think you need to escape your wildcards or the parameterization logic will get confused.
SELECT * FROM events WHERE summary ILIKE E'%%test%%' AND start_time > %(begin)s
I think %% is the correct escaping, but it could be \%