Ticket #9119: ignore_non_field_params_against_9066.diff
File ignore_non_field_params_against_9066.diff, 1.0 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/views/main.py
181 181 # 'key' will be used as a keyword argument later, so Python 182 182 # requires it to be a string. 183 183 del lookup_params[key] 184 lookup_params[smart_str(key)] = value 184 key = smart_str(key) 185 lookup_params[key] = value 185 186 187 # ignore parameters that are no field lookups 188 from django.db.models.sql.constants import LOOKUP_SEP 189 try: 190 field = self.opts.get_field(key.split(LOOKUP_SEP)[0]) 191 except models.FieldDoesNotExist: 192 del lookup_params[key] 193 continue 194 186 195 # if key ends with __in, split parameter into separate values 187 196 if key.endswith('__in'): 188 197 lookup_params[key] = value.split(',')