244 | | field_names = [qn(f.column) for f in self._meta.fields if not isinstance(f, AutoField)] |
245 | | db_values = [f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True)) for f in self._meta.fields if not isinstance(f, AutoField)] |
| 244 | field_names = [] |
| 245 | db_values = [] |
| 246 | placeholders = [] |
| 247 | for f in self._meta.fields: |
| 248 | if not isinstance(f, AutoField): |
| 249 | field_names += [ qn(f.column) ] |
| 250 | val = f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True)) |
| 251 | db_values += [ val ] |
| 252 | placeholders += [ (f.get_db_value_placeholder_prefix(val) or '') + '%s' + (f.get_db_value_placeholder_postfix(val) or '') ] |
248 | | field_names += [f.column for f in self._meta.fields if isinstance(f, AutoField)] |
249 | | db_values += [f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True)) for f in self._meta.fields if isinstance(f, AutoField)] |
250 | | placeholders = ['%s'] * len(field_names) |
| 255 | for f in self._meta.fields: |
| 256 | if isinstance(f, AutoField): |
| 257 | field_names += [ f.column ] |
| 258 | val = f.get_db_prep_save(raw and getattr(self, f.attname) or f.pre_save(self, True)) |
| 259 | db_values += [ val ] |
| 260 | placeholders += [ (f.get_db_value_placeholder_prefix(val) or '') + '%s' + (f.get_db_value_placeholder_postfix(val) or '') ] |
| 261 | |