1
0
mirror of https://github.com/django/django.git synced 2024-12-25 18:46:22 +00:00
django/tests/modeltests
Ramiro Morales 287565779d Added support for modifying the effect of `DISTINCT` clauses so they
only consider some fields (PostgreSQL only).

For this, the ``distinct()`` QuerySet method now accepts an optional
list of model fields names and generates ``DISTINCT ON`` clauses on
these cases. Thanks Jeffrey Gelens and Anssi Kääriäinen for their work.

Fixes #6422.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 20:42:40 +00:00
..
aggregation Renamed the fixtures used by the aggregation tests so they're only loaded by the tests that use them. Refs #17275. 2011-11-27 10:31:26 +00:00
basic Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
choices Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
custom_columns Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
custom_managers Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
custom_methods Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
custom_pk Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
defer Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
delete Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
distinct_on_fields Added support for modifying the effect of `DISTINCT` clauses so they 2011-12-22 20:42:40 +00:00
empty Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
expressions Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
field_defaults Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
field_subclassing Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
files Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
fixtures Changed the fixtures used to test the 'initial_data' feature so they don't contain datetimes. Refs #17275. 2011-11-27 13:00:56 +00:00
fixtures_model_package Changed the fixtures used to test the 'initial_data' feature so they don't contain datetimes. Refs #17275. 2011-11-27 13:00:56 +00:00
force_insert_update Fixed various dodgy behaviours 2011-12-17 17:37:24 +00:00
generic_relations Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
get_latest Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
get_object_or_404 Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
get_or_create Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
invalid_models Fix #16570: Restore ability to have decimal fields where max_digits equals decimal_places. Thanks dcwatson and kenth. 2011-11-12 19:53:56 +00:00
lookup Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
m2m_and_m2o Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
m2m_intermediary Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
m2m_multiple Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
m2m_recursive Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
m2m_signals Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
m2m_through Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
m2o_recursive Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
many_to_many Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
many_to_one Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
many_to_one_null Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
model_forms Refs #17215: Avoid generating 47 leftover tmp dirs during a clean test run. 2011-11-13 19:05:02 +00:00
model_formsets Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
model_inheritance Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
model_inheritance_same_model_name Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
model_package Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
mutually_referential Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
one_to_one Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
or_lookups Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
order_with_respect_to Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
ordering Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
pagination Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
prefetch_related Fixed various dodgy behaviours 2011-12-17 17:37:24 +00:00
properties Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
proxy_model_inheritance Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
proxy_models Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
raw_query Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
reserved_names Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
reverse_lookup Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
save_delete_hooks Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
select_for_update Fixed #17251 -- In the select_for_update tests, close manually database connections made in threads, so they don't stay "idle in transaction" until the GC deletes them. Thanks Anssi Kääriäinen for the report and patch. 2011-12-11 08:43:01 +00:00
select_related Switch several assertNumQueries to use the context manager, which is much more beautiful. 2011-10-14 17:03:08 +00:00
serializers Added support for time zones. Thanks Luke Plant for the review. Fixed #2626. 2011-11-18 13:01:06 +00:00
signals Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
str Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
tablespaces Modified the tablespaces tests so that they no longer rely on settings.DEFAULT_INDEX_TABLESPACE being empty. Refs #12308. 2011-10-15 15:54:53 +00:00
test_client Fixed #17323 -- Renamed HttpRequest.raw_post_data to request.body. Thanks for the patch, dstufft 2011-12-16 23:40:32 +00:00
timezones Fixed #17343 -- Changed the {% now %} tag to use the current time zone when time zone support is enabled. Thanks oinopion for the report. 2011-12-04 22:11:12 +00:00
transactions Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
unmanaged_models Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
update Convert all modeltests to use absolute imports, rather than relative ones. 2011-10-13 18:04:12 +00:00
user_commands Fixed incompatibility with Python 2.5 introduced in r17077. Thanks Florian for the heads up. 2011-11-09 17:39:07 +00:00
validation Added support for time zones. Thanks Luke Plant for the review. Fixed #2626. 2011-11-18 13:01:06 +00:00
validators Fixed #811 -- Added support for IPv6 to forms and model fields. Many thanks to Erik Romijn. 2011-06-11 13:48:24 +00:00
__init__.py