GraceQueryField/SimpleSearchForm builds db query.
GraceQueryField used to return a Q() instance for cleaned 'query' field. Unfortunately, bad queries were not always identified until the Q() instance was used to do a query. If the filter() is done while cleaning the data, this error case can be identified earlier and in what is likely a more appropriate place. Luckily, Django querysets are lazy, so only the SQL query is build -- nothing hits the database itself until the data is required.
Loading
Please register or sign in to comment