django/tests/regressiontests
Malcolm Tredinnick 7d9b29a56d Use plain model.Manager, or suitable proxy, for model saving.
We can't use the default manager in Model.save_base(), since we need to
retrieve existing objects which might be filtered out by that manager. We now
always use a plain Manager instance at that point (or something that can
replace it, such as a GeoManager), making all existing rows in the
database visible to the saving code.

The logic for detecting a "suitable replacement" plain base is the same as for
related fields: if the use_for_related_fields is set on the manager subclass,
we can use it. The general requirement here is that we want a base class that
returns the appropriate QuerySet subclass, but does not restrict the rows
returned.

Fixed #8990, #9527.

Refs #2698 (which is not fixed by this change, but it's the first part of a
larger change to fix that bug.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-15 03:41:33 +00:00
..
admin_ordering
admin_registration
admin_scripts Fixed #9293: Corrected expected test output for the admin_scripts tests, following the changes to --verbosity in 9110. Thanks to Alex for the report. 2008-10-04 01:16:30 +00:00
admin_validation Fixed #8027: correctly validate fields/fieldsets in `ModelAdmin` validation when using custom `ModelForm`s. 2008-08-28 15:43:04 +00:00
admin_views Fixed #10271, #10281 -- Fixed the handling multiple inline models that share a common base class and have the link to the inline parent on the base class. Includes modifications that allow the equivalent handling for GenericFields. Thanks to Idan Gazit, Antti Kaihola (akaihola), and Alex Gaynor for their work on this patch. 2009-03-10 11:19:26 +00:00
admin_widgets Changed "date" column to "start_date"--Oracle won't name columns with reserved keywords. 2009-01-16 21:18:21 +00:00
aggregation_regress Fixed #10425 -- Corrected the interaction of .count() with .annotate() when .values() is also involved. Thanks to kmassey for the report. 2009-03-14 04:32:52 +00:00
app_loading Fixed #10439 -- Fixed a subtle test failure caused by r9994. 2009-03-10 05:51:06 +00:00
auth_backends
backends Fixed #5543: callproc() and friends now work with Oracle and our FormatStylePlaceholderCursor. 2009-01-16 22:23:58 +00:00
bug639 Updated a few save() methods on models to accept force_insert and force_update 2008-08-28 19:28:17 +00:00
bug8245 Fixed #8245 -- Added a LOADING flag to autodiscover to prevent an admin.py module with errors from raising a spurious AlreadyRegistered exception in a subsequent call to autodiscover. 2008-12-23 18:25:24 +00:00
cache Fixed #6464 -- Added incr() and decr() operations on cache backends. Atomic on Memcache; implemented as a 2 stage retrieve/update on other backends. Includes refactor of the cache tests to ensure all the backends are actually tested, and a fix to the DB cache backend that was discovered as a result. Thanks to Michael Malone for the original patch. 2009-03-11 13:27:03 +00:00
comment_tests Factor out some common pieces of django.conf.LazySettings. 2009-03-02 04:48:22 +00:00
context_processors
custom_columns_regress Fixed #9736 -- Added quoting to the SQL constraint names generated during table creation. This is to accommodate primary keys with spaces. 2008-12-02 13:23:29 +00:00
custom_managers_regress Use plain model.Manager, or suitable proxy, for model saving. 2009-03-15 03:41:33 +00:00
datastructures Fixed #7496 -- It's now possible to pickle SortedDicts with pickle protocol 2 2008-08-25 04:00:15 +00:00
datatypes Fixed #10238: coerce TextField values to unicode in the oracle backend. 2009-03-13 19:57:00 +00:00
dateformat
datetime_safe
db_typecasts
decorators
defaultfilters Fixed #5748 -- Made floatformat filter round properly on all platforms and handle NaN input correctly on Windows. Also added tests for these cases. Thanks for the report and initial patch to SmileyChris and PJCrosier. 2008-11-08 01:44:46 +00:00
dispatch Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster. 2008-08-06 15:32:46 +00:00
expressions_regress Fixed #10161 -- Modified evaluation of query expressions to allow for operators that take the form of functions. This is mostly for the benefit of Oracle, but it should prove useful later on. Thanks to Ian for the report and feedback on the fix. 2009-02-24 11:15:31 +00:00
extra_regress Fixed #10256 -- Corrected the interaction of extra(select=) with values() and values_list() where an explicit list of columns is requested. 2009-02-16 12:28:37 +00:00
file_storage Fixed #9508 -- Added an appropriate FileField.__hash__ implementation. 2009-03-08 09:59:17 +00:00
file_uploads Fixed #8138 -- Changed django.test.TestCase to rollback tests (when the database supports it) instead of flushing and reloading the database. This can substantially reduce the time it takes to run large test suites. 2009-01-16 02:30:22 +00:00
fixtures_regress Fixed #9942 -- Added a to_python handler for FloatField to ensure correct typing of deserialized data before saving. Underlying problem is analogous to #8298, fixed in [8515]. Thanks to David Larlet <larlet@gmail.com> for the report and fix. 2009-01-03 04:43:58 +00:00
forms Fixed some test output in the wake of r9940. 2009-03-02 04:17:00 +00:00
generic_inline_admin Fixed #8138 -- Changed django.test.TestCase to rollback tests (when the database supports it) instead of flushing and reloading the database. This can substantially reduce the time it takes to run large test suites. 2009-01-16 02:30:22 +00:00
get_or_create_regress Fixed #3121 -- Made `get_or_create()` work for `RelatedManager` and `ManyRelatedManager`. 2008-08-16 20:59:06 +00:00
httpwrappers Fixed #8278: fixed `QueryDict.update(QueryDict)`. Thanks, julien. 2008-08-29 16:49:19 +00:00
humanize
i18n
initial_sql_regress
inline_formsets Fixed #9171 -- Fixed a few places where we were assuming lists instead of 2008-09-27 05:57:10 +00:00
m2m_regress [8721] introduced some internal field names. We hide them from the list of 2008-08-30 04:52:56 +00:00
m2m_through_regress Added a test to show that [8472] also fixed #8254. 2008-08-24 17:54:51 +00:00
mail Fixed #9214: EmailMessage now respects the From header instead of blindly using from_email. Thanks, Tai Lee. 2009-02-16 20:47:39 +00:00
managers_regress Fixed #7154 -- Inherit all model managers from abstract base classes. 2008-09-02 09:04:54 +00:00
many_to_one_regress Fixed #9649 -- Better error handling in model creation. 2009-03-06 04:51:05 +00:00
max_lengths
middleware The tests added in r9184 were altering the test environment in bad ways. Fixed 2008-10-08 08:36:41 +00:00
model_fields Fixed #5903 -- DecimalField.get_default() now correctly returns a Decimal object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto. 2009-02-11 20:13:17 +00:00
model_forms_regress Fixed #9319 -- Fixed a crash when using the same model field in multiple 2008-10-08 10:09:44 +00:00
model_inheritance_regress Fixed #10406 -- Fixed some problems with model inheritance and pk fields. 2009-03-04 07:21:14 +00:00
model_inheritance_select_related
model_regress Refs #10443: Added Oracle to the #10443 regression test exemption, since we don't yet support it. 2009-03-10 22:48:42 +00:00
modeladmin Fixed #9171 -- Fixed a few places where we were assuming lists instead of 2008-09-27 05:57:10 +00:00
null_fk
null_fk_ordering Fixed #7512 -- Fixed an oversight when I first fixed ordering on nullable 2008-09-01 02:43:55 +00:00
null_queries Improved table join handling for comparisons against NULL. 2009-03-06 02:02:09 +00:00
one_to_one_regress Improved table join handling for comparisons against NULL. 2009-03-06 02:02:09 +00:00
pagination_regress
queries Fixed #10432 -- Handle all kinds of iterators in queryset filters. 2009-03-08 03:32:16 +00:00
requests Fixed #7494 -- Fixed build_absolute_url() for some types of (uncommon) URLs. 2008-08-23 17:28:12 +00:00
reverse_single_related Fixed #7904: added support for a "use_for_related_fields" property on managers. If True, the manager will be used for related object lookups instead of the "bare" QuerySet introduced bu [8107]. Patch from Justin Bronn. 2008-08-05 16:13:28 +00:00
select_related_regress Fixed #8036 -- Fixed a case when attempting to traverse non-existent related 2008-08-26 20:44:20 +00:00
serializers_regress Corrected code in serializers_regress testcase so that, in the case where an exception has been raised, rollback is called before attempting to leave transaction management. With the old code the original exception (IntegrityError on InnoDB) was getting hidden by a transaction management error resulting from attempting to leave transaction management with a pending commit/rollback. 2009-01-18 20:54:42 +00:00
string_lookup Changed "exact" matches in MySQL to use the database's native collation. 2008-08-12 07:52:33 +00:00
syndication Added a test to ensure that strings in RSS are properly escaped. Refs #6533. 2008-08-27 19:52:27 +00:00
templates Fixed #9701 -- Added a "safeseq" template filter. 2009-03-02 08:16:33 +00:00
test_client_regress Fixed #4476 -- Added a ``follow`` option to the test client request methods. This implements browser-like behavior for the test client, following redirect chains when a 30X response is received. Thanks to Marc Fargas and Keith Bussell for their work on this. 2009-02-27 13:14:59 +00:00
test_utils
text
urlpatterns_reverse In urlconfs, include() may now be used on an iterable of patterns instead of just a module string. Refs #6470 -- making the admin use a urlconf is much easier with this work done. Thanks, Alex Gaynor. 2009-01-10 22:54:20 +00:00
utils Fixed #7201 -- Fixed the timeuntil filter to work correctly with timezone-aware 2008-08-26 08:08:55 +00:00
views Fixed #7602 -- Corrected lookup keyword arguments in archive_month and archive_week to properly range when date_field is from DateField. Thanks nullie for the original patch and Colin Grady for the test coverage. 2008-08-23 04:46:33 +00:00
__init__.py