django/tests/modeltests
Russell Keith-Magee 70a0de37d1 Fixed #3011 -- Added swappable auth.User models.
Thanks to the many people that contributed to the development and review of
this patch, including (but not limited to) Jacob Kaplan-Moss, Anssi
Kääriäinen, Ramiro Morales, Preston Holmes, Josh Ourisman, Thomas Sutton,
and Roger Barnes, as well as the many, many people who have contributed to
the design discussion around this ticket over many years.

Squashed commit of the following:

commit d84749a0f0
Merge: 531e771 7c11b1a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Wed Sep 26 18:37:04 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 531e7715da
Merge: 29d1abb 1f84b04
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Wed Sep 26 07:09:23 2012 +0800

    Merged recent trunk changes.

commit 29d1abbe35
Merge: 8a527dd 54c81a1
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 24 07:49:46 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 8a527dda13
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 24 07:48:05 2012 +0800

    Ensure sequences are reset correctly in the presence of swapped models.

commit e2b6e22f29
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 17:53:05 2012 +0800

    Modifications to the handling and docs for auth forms.

commit 98aba856b5
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 15:28:57 2012 +0800

    Improved error handling and docs for get_user_model()

commit 0229209c84
Merge: 6494bf9 8599f64
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 14:50:11 2012 +0800

    Merged recent Django trunk changes.

commit 6494bf91f2
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 17 21:38:44 2012 +0800

    Improved validation of swappable model settings.

commit 5a04cde342
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 17 07:15:14 2012 +0800

    Removed some unused imports.

commit ffd535e413
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 20:31:28 2012 +0800

    Corrected attribute access on for get_by_natural_key

commit 913e1ac84c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 20:12:34 2012 +0800

    Added test for proxy model safeguards on swappable models.

commit 280bf19e94
Merge: dbb3900 935a863
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 18:16:49 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit dbb3900775
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 18:09:27 2012 +0800

    Fixes for Python 3 compatibility.

commit dfd72131d8
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 15:54:30 2012 +0800

    Added protection against proxying swapped models.

commit abcb027190
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 15:11:10 2012 +0800

    Cleanup and documentation of AbstractUser base class.

commit a9491a8776
Merge: fd8bb4e 08bcb4a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 14:46:49 2012 +0800

    Merge commit '08bcb4aec1ed154cefc631b8510ee13e9af0c19d' into t3011

commit fd8bb4e3e4
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 14:20:14 2012 +0800

    Documentation improvements coming from community review.

commit b550a6d06d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:52:47 2012 +0800

    Refactored skipIfCustomUser into the contrib.auth tests.

commit 52a02f1110
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:46:10 2012 +0800

    Refactored common 'get' pattern into manager method.

commit b441a6bbc7
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:41:33 2012 +0800

    Added note about backwards incompatible change to admin login messages.

commit 08bcb4aec1
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Sep 15 18:30:33 2012 +0300

    Splitted User to AbstractUser and User

commit d9f5e5addb
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Sep 15 18:30:02 2012 +0300

    Reworked REQUIRED_FIELDS + create_user() interaction

commit 579f152e4a
Merge: 9184972 93e6733
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:18:37 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 918497218c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:18:19 2012 +0800

    Deprecate AUTH_PROFILE_MODULE and get_profile().

commit 334cdfc1bb
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:00:12 2012 +0800

    Added release notes for new swappable User feature.

commit 5d7bb22e8d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 19:59:49 2012 +0800

    Ensure swapped models can't be queried.

commit 57ac6e3d32
Merge: f2ec915 abfba3b
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 14:31:54 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit f2ec915b20
Merge: 1952656 5e99a3d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 08:29:51 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 19526563b5
Merge: 2c5e833 c4aa26a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 08:22:26 2012 +0800

    Merge recent changes from master.

commit 2c5e833a30
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 07:53:46 2012 +0800

    Corrected admin_views tests following removal of the email fallback on admin logins.

commit 20d1892491
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 01:00:37 2012 +0800

    Added conditional skips for all tests dependent on the default User model

commit 40ea8b8882
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 8 23:47:02 2012 +0800

    Added documentation for REQUIRED_FIELDS in custom auth.

commit e6aaf65970
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 8 23:20:02 2012 +0800

    Added first draft of custom User docs.

    Thanks to Greg Turner for the initial text.

commit 75118bd242
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date:   Mon Aug 20 11:17:26 2012 +0800

    Admin app should not allow username discovery

    The admin app login form should not allow users to discover the username
    associated with an email address.

commit d088b3af58
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date:   Mon Aug 20 10:32:13 2012 +0800

    Admin app login form should use swapped user model

commit 7e82e83d67
Merge: e29c010 39aa890
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Fri Sep 7 23:45:03 2012 +0800

    Merged master changes.

commit e29c010beb
Merge: 8e3fd70 30bdf22
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Aug 20 13:12:57 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 8e3fd703d0
Merge: 507bb50 26e0ba0
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Aug 20 13:09:09 2012 +0800

    Merged recent changes from trunk.

commit 507bb50a92
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 20:41:37 2012 +0800

    Modified auth app so that login with alternate auth app is possible.

commit dabe362836
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 20:10:51 2012 +0800

    Modified auth management commands to handle custom user definitions.

commit 7cc0baf89d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 14:17:28 2012 +0800

    Added model Meta option for swappable models, and made auth.User a swappable model
2012-09-26 18:48:09 +08:00
..
aggregation [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
basic [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
choices [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
custom_columns [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
custom_managers [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
custom_methods [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
custom_pk Use a name that exists in both python2 and 3, 2012-08-15 01:13:09 -07:00
defer [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
delete [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
distinct_on_fields [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
empty [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
expressions [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
field_defaults [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
field_subclassing [py3] Fixed uses of __metaclass__ in tests. 2012-08-15 00:31:29 +02:00
files Removed unnecessary bytes prefix for ContentFile 2012-08-29 11:32:18 +02:00
fixtures [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
fixtures_model_package [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
force_insert_update Fixed various dodgy behaviours 2011-12-17 17:37:24 +00:00
generic_relations [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
get_latest [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
get_object_or_404 [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
get_or_create Revert "Fixed #16865 -- Made get_or_create use read database for initial get query." 2012-09-19 11:15:12 -06:00
invalid_models Fixed #3011 -- Added swappable auth.User models. 2012-09-26 18:48:09 +08:00
known_related_objects Fixed #18177 -- Cached known related instances. 2012-05-24 13:25:01 +02:00
lookup [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
m2m_and_m2o [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
m2m_intermediary [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
m2m_multiple [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
m2m_recursive [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
m2m_signals [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
m2m_through [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
m2o_recursive [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
many_to_many [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
many_to_one [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
many_to_one_null [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
model_forms [py3] Fixed modeltests.model_forms tests. 2012-08-14 23:46:23 +02:00
model_formsets [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
model_inheritance [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
model_inheritance_same_model_name [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02: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 [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
or_lookups [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
order_with_respect_to [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
ordering [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
pagination [py3] Fixed paginator tests. 2012-08-15 14:58:43 +02:00
prefetch_related Fixed usage of several deprecated aliases in unittest. 2012-08-15 01:38:04 -07:00
properties Removed with_statement imports, useless in Python >= 2.6. Refs #17965. Thanks jonash for the patch. 2012-03-30 08:02:08 +00:00
proxy_model_inheritance [py3] Removed map() calls used for side-effects only 2012-08-15 13:23:41 +03:00
proxy_models Fixed #3011 -- Added swappable auth.User models. 2012-09-26 18:48:09 +08:00
raw_query Cleaned up some small bits of the ORM, including removing an import *. 2012-09-07 10:58:17 -04:00
reserved_names [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
reverse_lookup [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
save_delete_hooks [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
select_for_update [py3] Fixed remaining Python 3 syntax errors. 2012-07-22 09:29:53 +02:00
select_related [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
serializers [py3] Fixed uses of __metaclass__ in tests. 2012-08-15 00:31:29 +02:00
signals [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
str [py3] Fixed the str tests. 2012-08-16 09:44:42 +02:00
tablespaces Added missing relative imports in test files. 2012-05-12 19:58:32 +02:00
test_client [py3] Compared response.content with bytes. 2012-08-14 12:29:53 +02:00
timezones Decorated some tests that require tz support. 2012-08-11 17:32:24 -04:00
transactions [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
unmanaged_models [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
update [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
update_only_fields [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
user_commands [py3] Used compatible imports of StringIO. 2012-08-08 14:50:01 +02:00
validation [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
validators Fixed #18269 -- Applied unicode_literals for Python 3 compatibility. 2012-06-07 18:08:47 +02:00
__init__.py MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. 2006-05-02 01:31:56 +00:00