Jason Pellerin
f043b395ba
[multi-db] Fixed dummy backend DatabaseWrapper(): needs to accept settings argument like real backends.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-07 20:45:31 +00:00
Jason Pellerin
05086e5353
[multi-db] Added transaction and relation usage tests to multiple
...
databases model tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-06 21:45:52 +00:00
Jason Pellerin
062733a946
[multi-db] Began integrating Manager schema manipulation methods into django.core.management. Updated multiple db models test to include operations on installed models.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 20:57:52 +00:00
Jason Pellerin
f194f74aa6
[multi-db] Added install() and other schema manipulation methods to Manager. Fixed bug in manager assignment for inherited classes (objects and _default_manager in child class were still those belonging to parent class).
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 20:56:24 +00:00
Jason Pellerin
54d611d2a2
[multi-db] Added builder property to creation module of all backends. Currently for all backends builder is a django.db.backends.ansi.sql.SchemaBuilder.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3265 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 20:53:36 +00:00
Jason Pellerin
d2d269ea15
[multi-db] Made minor formatting updates. Added basic support for drop table, still needs to handle cascade.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 20:49:50 +00:00
Jason Pellerin
8f1d2bc98a
[multi-db] Added TEST_DATABASES tuple to runtests.py. Now, databases in TEST_DATABASES will be created (if they don't exist or if the user accepts) at the start of the test run and dropped at the end. Those databases will be assigned to settings.DATABASES, with settings other than the database name inherited either from the DATABASES property in the active settings file (if it is present and contains a matching key) or from the default database settings.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3263 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 20:47:33 +00:00
Jason Pellerin
a206863cf6
[multi-db] Fix style handling: don't use mutable default style argument.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 16:58:31 +00:00
Jason Pellerin
2f44c9f24f
[multi-db] Added django.db.backends.ansi.sql, with BoundStatement and SchemaBuilder classes that are used to construct the SQL for creating tables, indexes, etc. Added tests for basic table, relationship, index and initial data creation. Added supports_compound_statements flag to backends to avoid splitting initial data when not needed.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 16:53:50 +00:00
Jason Pellerin
1c6199dc87
[multi-db] Merge trunk to [3257]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-03 14:23:39 +00:00
Jason Pellerin
4190c9e16f
[multi-db] Added initialization code to runtests.py that creates
...
two named test databases, 'django_test_db_a' and 'django_test_db_b',
along with the default test database. Moved multiple databases test to
modeltests and reorganized it to match other model tests.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-30 18:03:56 +00:00
Jason Pellerin
763e087de1
[multi-db] Cleaned up settings access in ConnectionInfo.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-30 18:02:01 +00:00
Jason Pellerin
3d8ebb3bec
[multi-db] Added DATABASES = {} to global_settings
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-30 18:00:58 +00:00
Jason Pellerin
a50d895f28
[multi-db] Updated tests/runtests.py to create test databases for all
...
named connections (if any) in addition to the default connection.
Updated LazyConnectionManager to allow assignment to connection names.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-29 22:00:25 +00:00
Jason Pellerin
75b64abaa7
[multi-db] Added optional db_connection property to model Meta classes,
...
which can be used to set the name of the connection for the model.
Updated query generation in model, query and fields/related to
use the model's connection and backend. Added basic model connection
access to multiple db test.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 22:21:45 +00:00
Jason Pellerin
9bae64fa76
[multi-db] Added connections parameter to transaction
...
functions, where appropriate, to allow specifying which connections to
commit or rollback.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 21:38:04 +00:00
Jason Pellerin
68cc8a1131
Added basic tests for settings.DATABASES populating
...
django.db.connections with lazy db connections.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 19:26:33 +00:00
Jason Pellerin
966df94e75
Removed redundant error check.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3230 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 18:41:07 +00:00
Jason Pellerin
f19713f56f
* Added connect() function and ConnectionInfo class to abstract
...
connection-establishment mechanics.
* In backends, added required settings parameter to DatabaseWrapper(), so
that connections can keep track of their settings.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 18:35:43 +00:00
Jason Pellerin
da5b0586d3
Merge trunk to [3226]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 17:07:26 +00:00
Jason Pellerin
54b6e96957
Merge trunk to [3216]
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 17:00:52 +00:00
Jacob Kaplan-Moss
1184850665
Created branch for MultipleDatabaseSupport. Refs #1142 .
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 19:17:02 +00:00
Russell Keith-Magee
dc473309ef
Fixed #1661 -- Added logic for string-form model references in the 'to' argument of OneToOneFields. Includes regression test.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 08:16:36 +00:00
Russell Keith-Magee
6cbdbffc80
Added comments to clarify the string->field name resolution logic.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 07:43:33 +00:00
Russell Keith-Magee
0d4b5b9b4a
Fixed #1662 -- Added resolver for string-form model references for models that have already been loaded, with tests to validate both forward and backward referenced model names. Light refactoring of model loading to make regression tests behave more like normal model loading. Also clarifies the text of some validation errors.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 04:37:00 +00:00
Jacob Kaplan-Moss
bc2d8cdbc6
Fixed #2199 : deleting objects with generic foreign keys in the admin now works. Thanks, Jay Parlar
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-22 18:44:06 +00:00
Adrian Holovaty
10229c4a1e
Changed default 500 view NOT to use RequestContext, to lessen the chance that the 500 view would raise an error in itself
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-22 16:28:40 +00:00
Adrian Holovaty
d8acac975a
Fixed typo in docs/request_response.txt
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-22 04:56:35 +00:00
Jacob Kaplan-Moss
a490d6b4f6
Fixed a few small rst errors in request/response and fastcgi docs.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 23:06:24 +00:00
Adrian Holovaty
a159f660fe
Reverted [3184]. There's no such thing as models.PasswordField.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 14:42:52 +00:00
Malcolm Tredinnick
68cfd446a3
Fixed the "timeuntil" and "timesince" tests so that they don't fail on a
...
machine under heavy load.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 12:11:00 +00:00
Malcolm Tredinnick
3465a4f6f4
Fixed #1240 -- Updated bash completion file to accomodate changes in r3174.
...
Thanks, Paolo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 11:15:01 +00:00
Malcolm Tredinnick
ae1234f2a2
Fixed #2163 -- Corrected typo when handling datetimes with timezones in the timesince filter. Thanks, Alex Dedul.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 11:11:03 +00:00
Malcolm Tredinnick
239adf83d3
Fixed #2053 -- added an optional comparison argument to the "timesince" filter.
...
Added a "timeuntil" filter that works analogously. Thanks, john@sneeu.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 06:56:08 +00:00
Malcolm Tredinnick
c4fa8a158a
Fixed #2071 -- documented the PasswordField (including cavaets). Thanks to
...
asmodai for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 04:49:12 +00:00
Malcolm Tredinnick
b70a687777
Fixed #2031 -- Don't try to remove microseconds on date objects (only datetime)
...
for MySQL. Refs #316 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 04:13:48 +00:00
Malcolm Tredinnick
ba22f55aa2
Fixed #1928 -- Correctly create foreign key references when there are multiple
...
keys on multiple models. Based on a patch from Geert Vanderkelen and some
diagnosis from hornero.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 03:39:47 +00:00
Adrian Holovaty
0e92f70602
Fixed runtests.py problem from [3177] where it assumed you were running the tests from within the tests directory
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 14:27:44 +00:00
Adrian Holovaty
5f47161831
Added semicolon test to regressiontests/initial_sql_regress/sql/simple.sql
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 14:11:59 +00:00
Adrian Holovaty
dc4f726df9
Fixed #688 -- Changed default 404 and 500 views to use RequestContext
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 14:07:48 +00:00
Malcolm Tredinnick
92571b0d48
Fixed #2119 -- fixed problems with splitting SQL statements into separate
...
statements. Uses a patch from eaw@woudy.org and some contributions from
jpellerin@gmail.com . Also fixes #2034 and #1935 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 08:00:44 +00:00
Malcolm Tredinnick
3e97535907
Fixed #2161 -- handle trailing newlines in initial SQL data. Includes
...
regression test. Thanks to russellm.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 07:12:45 +00:00
Malcolm Tredinnick
a513fcb455
Added regressions tests to ensure that one-to-one and many-to-many fields
...
continue to interact properly. Refs #1064 . Refs #1506 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 05:29:19 +00:00
Adrian Holovaty
76448d0c4b
Added draft of docs/fastcgi.txt. Haven't finished editing this yet.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 05:25:02 +00:00
Adrian Holovaty
32228d2031
Added django/core/servers/fastcgi.py and manage.py 'runfcgi' option. Thanks, jcrasta@gmail.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 05:24:19 +00:00
Adrian Holovaty
a4b11826a7
Tightened up code in django.contrib.contenttypes.models.ContentTypeManager.get_for_model() to use get_or_create()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:47:07 +00:00
Adrian Holovaty
fb1c01b103
Fixed #1802 -- Fixed database integrity error when creating permission objects after renaming a model
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:44:27 +00:00
Adrian Holovaty
37addba352
Converted request.META['REQUEST_METHOD'] calls to request.method, throughout the Django codebase
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:34:13 +00:00
Adrian Holovaty
b93de6a2cb
Fixed bad formatting in 'lookup' model tests from [3157]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:16:11 +00:00
Adrian Holovaty
f67b629ada
Fixed comma splice in auth.User model docstring
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:14:10 +00:00