=== modified file 'django/db/models/query.py'
|
|
|
141 | 141 | return obj_dict |
142 | 142 | |
143 | 143 | def __repr__(self): |
144 | | return repr(list(self)) |
| 144 | # We don't want to return the repr of an enormous QuerySet, so truncate |
| 145 | # after hitting CHUNK_SIZE |
| 146 | if len(self) > CHUNK_SIZE: |
| 147 | return '%s ... and %d more items (%d total)' \ |
| 148 | % (repr(list(self[:CHUNK_SIZE])), |
| 149 | len(self) - CHUNK_SIZE, |
| 150 | len(self)) |
| 151 | else: |
| 152 | return repr(list(self)) |
145 | 153 | |
146 | 154 | def __len__(self): |
147 | 155 | # Since __len__ is called quite frequently (for example, as part of |