Commit Graph

1661 Commits

Author SHA1 Message Date
Adrian Holovaty 1a53632306 magic-removal: Fixed bug in field-name calculation in ValuesQuerySet.iterator()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2203 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 02:29:31 +00:00
Luke Plant 8aeeec0b35 magic-removal: Fixed an incorrect model test in 'ordering', and updated comments too.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 02:27:18 +00:00
Luke Plant 758f1366c2 magic-removal: fixed bug with indexing in QuerySet.__getitem__
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 02:22:54 +00:00
Adrian Holovaty e51fcf8ec3 magic-removal: Created InBulkQuerySet, ValuesQuerySet and DateQuerySet, subclasses of QuerySet that provide custom iterator(). This lets you use iterator() with in_bulk(), values() and dates(). Also added unit tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 02:21:31 +00:00
Luke Plant 2983bd8989 magic-removal: updated syntax of 'or_lookup' model tests, including
logical combinations of both QuerySets and Q objects


git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 02:06:42 +00:00
Luke Plant b72d8da3b2 magic-removal: removed legacy 'import copy', and re-introduced Q() objects
as positional parameters to the QuerySet methods that took keyword arguments


git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 02:04:45 +00:00
Luke Plant 34bf9e8d31 magic-removal: Fixed bug with .values() when no arguments are passed, and added test for it
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 01:50:16 +00:00
Adrian Holovaty 5b34ff236a magic-removal: Changed Manager so that it's not a subclass of QuerySet, and implemented proxy methods to the QuerySet methods it needs.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 01:13:10 +00:00
Adrian Holovaty 9fa5c43d5b magic-removal: Changed syntax in unit tests -- hopefully for the last time.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 01:08:02 +00:00
Adrian Holovaty a6cf387d6b magic-removal: Implemented Manager.all() and changed Manager so that it doesn't cache.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 00:02:11 +00:00
Adrian Holovaty 836478fa74 magic-removal: Renamed Manager.klass to Manager.model
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 23:40:54 +00:00
Adrian Holovaty a917054961 magic-removal: Renamed self.klass to self.model in QuerySet
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 22:50:38 +00:00
Adrian Holovaty b349e42aac magic-removal: Updated unit tests to use objects.all()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 22:44:05 +00:00
Adrian Holovaty ad211a7cc3 magic-removal: Restored and/or support for QuerySets
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 22:23:21 +00:00
Adrian Holovaty cf376353a6 magic-removal: Merged to [2187]
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 22:06:18 +00:00
Adrian Holovaty 030f8d6af1 magic-removal: Fixed #1297 -- Fixed Python 2.4 style dict.update() to Python 2.3-compatible
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 18:00:53 +00:00
Adrian Holovaty c0529945b4 magic-removal: Fixed a couple more unit-test bugs
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 06:07:57 +00:00
Adrian Holovaty 104fcb2447 magic-removal: Fixed bugs in many_to_one unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 06:00:50 +00:00
Adrian Holovaty 08e3bc8dd8 magic-removal: Fixed bug in many_to_one unit test
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 05:57:30 +00:00
Adrian Holovaty 13cea53bb2 magic-removal: Implemented Manager.add()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 05:54:12 +00:00
Adrian Holovaty e49a09731b magic-removal: Implemented QuerySet.values(). All 'lookup' unit tests pass.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 05:38:02 +00:00
Adrian Holovaty 913ed88397 magic-removal: Fixed bug in _get_next_or_previous_by_FIELD()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 05:26:31 +00:00
Adrian Holovaty f0d3b56d76 magic-removal: Fixed some errors in 'lookup' model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 05:21:11 +00:00
Adrian Holovaty 93399167b6 magic-removal: Various fixes to QuerySet. Temporarily turned off caching.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 05:20:36 +00:00
Adrian Holovaty 97e7ff7c27 magic-removal: Changed get_DATEFIELD_list() manager method to dates(), which takes the name of the date field. Updated docs and unit tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 04:36:41 +00:00
Adrian Holovaty cf276407ea magic-removal: Fixed _get_next_or_previous_by_FIELD() to use new-style lookup
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 04:05:53 +00:00
Adrian Holovaty b3e9732eff magic-removal: Fixed _set_core_filter() call in db.models.fields.related
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 04:04:12 +00:00
Adrian Holovaty 4d3763123a magic-removal: Changed exception text for in_bulk() error
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 04:01:58 +00:00
Adrian Holovaty 7ff623755a magic-removal: Fixed legacy get_object() call in Model._get_next_or_previous_by_FIELD()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 03:51:55 +00:00
Adrian Holovaty e4112922f7 magic-removal: Fixed subtle bug in QuerySet ordering -- now, if _order_by is an empty sequence, no ordering will be done. If it's None, it will use the model's ordering setting
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 03:51:10 +00:00
Adrian Holovaty abd2bdba14 magic-removal: Fixed bug in manipulators model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 03:41:18 +00:00
Adrian Holovaty a71574a476 magic-removal: Changed custom_managers unit tests to set core_filters directly rather than _set_core_filter()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 03:40:06 +00:00
Adrian Holovaty 85ff60d06a magic-removal: Restored extra() on QuerySet -- renamed from extras()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2168 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 03:36:25 +00:00
Adrian Holovaty 9708aa51c0 magic-removal: Restored __getitem__() on QuerySet and fixed bug in QuerySet._clone()
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 03:33:40 +00:00
Adrian Holovaty f771586deb magic-removal: Moved delete() from Manager to QuerySet
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 03:17:19 +00:00
Adrian Holovaty 43179e41ae magic-removal: Restored caching on QuerySet
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 02:57:04 +00:00
Adrian Holovaty d1d3925beb magic-removal: Fixed #1293 -- Added missing exception. Thanks, chad.cornsilk.net
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2164 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 02:51:47 +00:00
Adrian Holovaty d53837b8bb magic-removal: Changed QuerySet._clone() to copy self.klass
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 02:23:56 +00:00
Adrian Holovaty 50e17688b0 magic-removal: Added small comment for ManagerDescriptor
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2162 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 02:19:45 +00:00
Adrian Holovaty f925d89d11 magic-removal: Changed QuerySet._clone() to clone where, params and tables
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 02:11:21 +00:00
Adrian Holovaty 880c176381 magic-removal: Changed QuerySet to copy core_filters in init() instead of for every query
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 02:09:25 +00:00
Adrian Holovaty 502225ef86 magic-removal: Massaged Manager and QuerySet. Still more work to do.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2159 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 02:07:10 +00:00
Adrian Holovaty 06842af5ab magic-removal: Removed support for old-style related object lookup (get_foo() methods)
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 00:46:47 +00:00
Adrian Holovaty 2be3eefdff magic-removal: Updated some of the unit tests to use new syntax. 175 unit-test failures at this point.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-30 00:38:23 +00:00
Adrian Holovaty 83f8870489 magic-removal: Removed unnecessary legacy 'import copy' and restored some spacing that had been changed (for easier understanding of diffs)
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-29 02:02:58 +00:00
Russell Keith-Magee 5bac096399 magic-removal: Moved related name clash check logic out of Options, and into the
validation phase of model loading.


git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-29 01:38:48 +00:00
Luke Plant d580b42d45 magic-removal: Removed caching hack for managers, disabling caching for everything except related objects
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2154 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-29 01:09:10 +00:00
Luke Plant a33aa41fbf magic-removal: Fixed SingleRelatedObjectDescriptor for new manager syntax
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-29 00:59:37 +00:00
Luke Plant 4d7e3c43c5 magic-removal: Fixed syntax of call to _set_core_filters in ManyRelatedObjectsDescriptor
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-29 00:34:49 +00:00
Luke Plant 2fd362f2d7 magic-removal: Updated model tests for new syntax: 'basic', 'custom_managers' and 'custom_columns'
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-29 00:23:52 +00:00