Commit Graph

1749 Commits

Author SHA1 Message Date
Adrian Holovaty 23748415d3 magic-removal: Improved model unit-test runner to rollback database for each test in case of exception
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 23:24:20 +00:00
Adrian Holovaty e456bbb752 magic-removal: Refactored ManyRelatedObjectsDescriptor and ReverseManyRelatedObjectsDescriptor to use normal class syntax in creation of RelatedManager, rather than using types module. It's more readable now.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 22:47:57 +00:00
Adrian Holovaty 36c66d7d39 magic-removal: Fixed incorrect related_name in m2o_recursive unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 22:31:56 +00:00
Adrian Holovaty bd5b9412b3 magic-removal: Changed QuerySet.in_bulk() to check for tuple or list, because it was accepting strings, which are iterable.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 22:29:15 +00:00
Adrian Holovaty c060e85c8d magic-removal: Removed Model._get_related_many_to_many(), which was no longer being used.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 22:18:51 +00:00
Luke Plant 3c1bdb0d90 magic-removal: Fixed __collect_sub_objects, so delete() now works and some more tests pass.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 20:42:44 +00:00
Adrian Holovaty 2ff5e5e765 magic-removal: Added ReverseManyRelatedObjectsDescriptor, which implements many-to-many lookup -- e.g. poll_obj.sites rather than poll_obj.get_site_list(). Many-to-many addition/deletion still needs to be done.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 20:36:50 +00:00
Adrian Holovaty f59ca4e96c magic-removal: Removed QuerySet.core_filters hook, because we now have Manager.get_query_set() hook
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 20:32:19 +00:00
Adrian Holovaty 5f646ff486 magic-removal: Fixed bugs in m2o_recursive2 model unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 20:29:45 +00:00
Adrian Holovaty 6fa54ec9fd magic-removal: Fixed many_to_many and m2m_multiple model unit tests to use correct many-to-many manager name (the field name, not object_name +'_set')
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 20:03:04 +00:00
Adrian Holovaty b9c2b3e83f magic-removal: Changed model validator not to check for 'singular' on ManyToManyFields, because that's not going to be used anymore.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 20:01:58 +00:00
Adrian Holovaty ce0c6887d6 magic-removal: Collapsed else statements in SingleRelatedObjectDescriptor and ManyRelatedObjectsDescriptor
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 19:11:04 +00:00
Adrian Holovaty fe94847e2c magic-removal: Updated one_to_one unit tests to use self.restaurant instead of self.get_restaurant(), etc.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 17:23:24 +00:00
Adrian Holovaty 3310377501 magic-removal: Fixed #1324 -- Added missing comma to models.fields.related. Thanks, andreas@mindpicnic.com
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 15:04:38 +00:00
Luke Plant 4d724b4d90 magic-removal: Updated m2m_intermediary tests to use new attribute syntax.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 13:28:29 +00:00
Luke Plant 5366beeb70 magic-removal: Fixed bug in parse_lookup introduced in 2150, and tidied up a bit
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-03 13:03:51 +00:00
Adrian Holovaty 1308017f62 magic-removal: Fixed #1308 -- Updated get_package() -> package() in admin models
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 14:53:12 +00:00
Adrian Holovaty fd7c0a1a7c magic-removal: Merged to [2226]
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 05:11:21 +00:00
Adrian Holovaty 35a3103283 magic-removal: Merged to [2223]
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 05:01:10 +00:00
Adrian Holovaty 58bf60ec3d magic-removal: Fixed #1301 -- Fixed AttributeError when QuerySet.dates() is filtered. Thanks, Esaj
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 04:46:56 +00:00
Adrian Holovaty 77816bc850 magic-removal: Fixed #1304 -- template.resolve_variable() now resolves integers, as in trunk. When did this get removed, I wonder?
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2222 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 04:43:37 +00:00
Adrian Holovaty 124944e5ed magic-removal: Fixed #1312 -- made QuerySet.in_bulk() accepting of any iterable, not just lists
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 04:38:45 +00:00
Adrian Holovaty b78f2a9827 magic-removal: Fixed #1307 -- API changes in admin views. Thanks, mookai
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 03:20:37 +00:00
Adrian Holovaty a9db2c18c0 magic-removal: Fixed #1308 -- API changes in admin models. Thanks, mookai
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 03:19:12 +00:00
Adrian Holovaty 52b2dd620f magic-removal: Fixed #1313 -- Bugfixes for magic-removal. Thanks, jpaulofarias
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 03:18:09 +00:00
Adrian Holovaty 171c1a5a06 magic-removal: Fixed #1314 -- Made bugfixes for admin interface. Thanks, jpaulofarias
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 03:17:13 +00:00
Luke Plant c6db2578de magic-removal: Updated Manager in comments model to use .model instead of .klass
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-01 18:47:12 +00:00
Luke Plant 9dc4aa97ff magic-removal: Fixed #1306 - Auth Manager now uses .model not .klass. Thanks jpaulofarias
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-01 18:43:23 +00:00
Russell Keith-Magee 8df94de53b magic-removal: Added a 'reset' command to management that executes the output of the 'sqlreset' command.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-01 13:21:16 +00:00
Adrian Holovaty 2cdd5b1b37 magic-removal: Got admin changelist working with descriptor fields
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2213 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-01 04:58:42 +00:00
Adrian Holovaty b01b9e3a87 magic-removal: Updated django.core.paginator to work with QuerySet objects instead of Managers/Models
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-01 03:35:59 +00:00
Adrian Holovaty a06b44bdc4 magic-removal: Fixed #1300 -- Converted various Django code to use the new descriptor-fields DB API. Thanks much, Esaj
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 23:42:58 +00:00
Luke Plant 671da7036f magic-removal: Fixed some incorrect tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 23:28:47 +00:00
Adrian Holovaty 5bf57ef71c magic-removal: Changed SingleRelatedObjectDescriptor to use self._field instead of self.field
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 23:22:23 +00:00
Luke Plant ac67992c79 magic-removal: Fixed (very broken) dynamic creation of method and use of super in last commit,
so that RelatedManager works in other contexts now


git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 23:10:43 +00:00
Luke Plant cef5e5421d magic-removal: fixed RelatedManager by making it work as a custom manager, and 24 related tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 22:26:53 +00:00
Luke Plant a37d862ded magic-removal: fixed an out-by-one error in the 'basic' model tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 22:02:20 +00:00
Luke Plant 5c3789c908 magic-removal: extracted usages of QuerySet in Manager to a single method,
which can easily be overridden to create custom managers, and updated 
tests with new method of creating custom managers.


git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-31 21:54:28 +00:00
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