1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00
Commit Graph

1015 Commits

Author SHA1 Message Date
Alex Gaynor
e95bc7b50d [soc2009/multidb] Cleaned up the interaction between managers and the using() method by the addition of a db_manager() method.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-18 01:31:53 +00:00
Alex Gaynor
601db0d2df [soc2009/multidb] Merged up to trunk r11901.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 22:18:23 +00:00
Alex Gaynor
2269813616 [soc2009/multidb] Merged up to trunk r11900.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 22:07:42 +00:00
Alex Gaynor
bdf21ccf8b [soc2009/multidb] Modified using= arguments to default to None; modified querysets so you can track explicit database assignments. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 16:13:07 +00:00
Alex Gaynor
44f21f2374 [soc2009/multidb] Add multi-db support to fixture loading. Involves a rework of models in the multi-db test cases to make the fixture a complete test case. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 16:12:43 +00:00
Alex Gaynor
3c8c3bd651 [soc2009/multidb] Updated contrib.auth User model for multi-db support. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 16:12:23 +00:00
Alex Gaynor
2a99b2ba5b [soc2009/multidb] Updated content types to be multidb aware. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 16:12:06 +00:00
Alex Gaynor
f9412b4d21 [soc2009/multidb] Merged up to trunk r11885.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 15:15:26 +00:00
Alex Gaynor
fc36471d1b [soc2009/multidb] Fixed a problem with m2m descriptors not sticking to the right database. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-16 07:01:56 +00:00
Alex Gaynor
4e25ca00c8 [soc2009/multidb] Merged up to trunk r11864.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11866 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-14 17:47:04 +00:00
Alex Gaynor
2794cceb5f [soc2009/multidb] Merged up to trunk r11858.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13 22:15:08 +00:00
Alex Gaynor
049dc42bde [soc2009/multidb] Merged in all of Justin Bronn's GIS work. Multidb should now work fully with GIS. This is backwards incompatible, if you are using GIS, your ENGINE setting should now be django.contrib.gis.db.backends.XXX where XXX is the name of your DB backend. Thanks to Justin for all his work. This also resolves merge conflicts from the previous commit.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12 02:13:30 +00:00
Alex Gaynor
c88113683d [soc2009/multidb] Merged up to trunk r11810. There are many conflicts in this merge, these will be resolved in a subsequent commit.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11812 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12 02:10:28 +00:00
Alex Gaynor
bee835fa44 [soc2009/multidb] Merged up to trunk r11804.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-09 17:23:16 +00:00
Alex Gaynor
fdadb7bf18 [soc2009/multidb] Merged up to trunk r11785.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-03 06:28:26 +00:00
Alex Gaynor
1dafb9ad6c [soc2009/multidb] Resolved a number of strange merge conflicts that had arisen throughout various merges.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-23 16:46:07 +00:00
Alex Gaynor
4e36fffab2 [soc2009/multidb] Renaming of database attributes - you now use NAME, ENGINE, etc rather than DATABASE_NAME, DATABASE_ENGINE inside DATABASES. Also deprecates the use of short names (.e.g., `sqlite3` for backends in ENGINE). Patch from Russell Keith-Magee.
Conflicts:

	docs/releases/1.2.txt

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-23 16:45:41 +00:00
Alex Gaynor
3e6ae729bc [soc2009/multidb] Added test cases for cross-database assignment. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-23 16:44:47 +00:00
Alex Gaynor
ca0698553e [soc2009/multidb] Cleaned up check in aggregation_regress to remove the assumption that the only objects in __dict__ are field attributes. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-23 16:44:38 +00:00
Alex Gaynor
da909ae3a0 [soc2009/multidb] Made instances sticky to the database that created them.
This involves:
 * Adding a _state attribute to instances to track instance state
 * Making db a state attribute, and making the db a public attribute on querysets.

Patch from Russell Keith-Magee.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-23 16:43:54 +00:00
Alex Gaynor
f2604c331d [soc2009/multidb] Updated testing services to handle multiple databases better. Includes extra tests (some failing) for multiple database support. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-23 16:42:56 +00:00
Alex Gaynor
1fc8f9a279 [soc2009/multidb] Merged up to trunk r11760.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11762 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-23 14:25:44 +00:00
Alex Gaynor
4f40925785 [soc2009/multidb] Split SQL construction into two seperate classes, the Query class which stores data about a query being constructed, and a Compiler class which generates SQL.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-21 07:03:40 +00:00
Alex Gaynor
e9e73c4b68 [soc2009/multidb] Merged up to trunk r11756.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-21 06:55:11 +00:00
Alex Gaynor
2bc7422b52 [soc2009/multidb] Updated to trunk r11603. This includes a critical security fix.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-09 22:16:10 +00:00
Alex Gaynor
0d62f50271 [soc2009/multidb] Added tests for using foreign keys across multipled databases, ManyToMany tests will come after the merger of my many-to-many refactor work.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-09 22:03:24 +00:00
Alex Gaynor
fde0bfe929 [soc2009/multidb] Fix the extra_regress tests to be more forward compatible.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11422 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-09 02:55:45 +00:00
Alex Gaynor
2231e64115 [soc2009/multidb] Fixed some exceptionally weird merging that git did. Bad git.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11408 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-06 00:48:45 +00:00
Alex Gaynor
b7b5493fc3 [soc2009/multidb] Fix the remaining tests that were depending on the out of date setting.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11407 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-06 00:46:53 +00:00
Alex Gaynor
8ad4ea7b04 [soc2009/multidb] Fix a number of tests that were looking at settings.DATABASE_ENGINE, which has been deprecated in favor of the DATABASES interface
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-06 00:27:53 +00:00
Alex Gaynor
e2fecde4a9 [soc2009/multidb] Removed several tests that were no longer needed as they're tested elsehwere
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 21:49:24 +00:00
Alex Gaynor
3cd611b89c [soc2009/multidb] Switched from using an ugly hacky wrapper to a Metaclass for maitaing backwards compatibility in the get_db_prep_* and db_type methods. Thanks to Jacob for the good idea.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-01 05:26:02 +00:00
Alex Gaynor
1a98f6ff26 [soc2009/multidb] Updated to trunk r11371.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-31 18:29:06 +00:00
Alex Gaynor
ac74fa7e32 [soc2009/multidb] Correctly handle pickling of Query objects, restoring them to the correct database.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-20 18:52:47 +00:00
Alex Gaynor
502d4982c9 [soc2009/multidb] Raise an exception at an attempt to do a subquery with 2 different databases. Eventually we'll just evaluate the 2 queries seperates.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-19 21:57:08 +00:00
Alex Gaynor
8395544774 [soc2009/multidb] Added connection parameter to the get_db_prep_* family of functions. This allows us to generate the lookup and save values for Fields in a backend specific manner.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-17 15:57:43 +00:00
Alex Gaynor
24b66ace9d [soc2009/multidb] Merged up to trunk r11251.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 23:13:49 +00:00
Alex Gaynor
08ab082480 [soc2009/multidb] Merged up to trunk r11240.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 03:02:08 +00:00
Alex Gaynor
94e002c6e4 [soc2009/multidb] Merged up to trunk r11205
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-09 17:45:59 +00:00
Alex Gaynor
5d462b9ec1 [soc2009/multidb] Added a using option to a Model's Meta class. This allows you to select the default database for a specific model, in addition to the global default
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-01 05:01:59 +00:00
Alex Gaynor
2ab1840a9d [soc2009/multidb] Merged up to trunk r11127
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-01 04:20:38 +00:00
Alex Gaynor
b4e069fab4 [soc2009/multidb] Fixed running the admin_scripts tests under sqlite without having DATABASE_NAME set
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-19 01:09:21 +00:00
Alex Gaynor
903ff126b0 [soc2009/multidb] Added tests to ensure that objects aren't being created before they are supposed to be, which would indicate we weren't creating objects in the right DB.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-19 00:29:18 +00:00
Alex Gaynor
4f461542b5 [soc2009/multidb] Ensure that when a QuerySet is given a Query object in its construct that we correct the detect the connection that is being used
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 17:31:36 +00:00
Alex Gaynor
bc3cd5d952 [soc2009/multidb] Merged up to trunk r11068
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-18 17:03:52 +00:00
Alex Gaynor
f6db1dd357 [soc2009/multidb] Merged up to trunk r11009
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-16 01:36:05 +00:00
Alex Gaynor
83df1f1056 [soc2009/multidb] Merged up to trunk r10973. Resolved merge conflicts
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-10 23:30:30 +00:00
Alex Gaynor
1653ffb571 [soc2009/multidb] Updated DateQuery to work correctly with multiple databases
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10943 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-07 23:56:42 +00:00
Alex Gaynor
f57bc92842 [soc2009/multidb] Merged upto trunk r10941
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-07 23:42:26 +00:00
Alex Gaynor
4d6c6d0596 [soc2009/multidb] Fixed the usage of the connection during Query construction, and defer it until actual SQL construction. In practice this means the GROUP BY optimization we do will be correctly applied based on the connection the Query is executed against, as oppossed to the on the QuerySet is targeting at the time the GROUP BY items are added
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-06 19:38:29 +00:00