Commit Graph

127 Commits

Author SHA1 Message Date
Joseph Kocherhans 2f45af6f58 Fixed #12818. SQLite now properly quotes strings for date extraction and truncation. Thanks, SmilyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-24 15:29:25 +00:00
Russell Keith-Magee 11ee9746a0 Fixed #12702 -- Introduced a common implementation of DatabaseError and IntegrityError, so that database backends can (re)raise common error classes. Thanks for Waldemar Kornewald for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-29 15:45:55 +00:00
Adrian Holovaty 5ceed0a053 Changed a whole bunch of places to raise exception instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10 18:36:20 +00:00
Russell Keith-Magee ff60c5f9de Fixed #1142 -- Added multiple database support.
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.

Big thanks also go to:
 * Justin Bronn for keeping GIS in line with the changes,
 * Karen Tracey and Jani Tiainen for their help testing Oracle support
 * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
 * Malcolm Treddinick for his guidance during the GSoC submission process.
 * Simon Willison for driving the original design process
 * Cal Henderson for complaining about ponies he wanted.

... and everyone else too numerous to mention that helped to bring this feature into fruition.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 15:18:51 +00:00
Karen Tracey 5bd63663a9 Fixed #399: Added big integer field. Thanks to Tomáš Kopeček for persistently maintaining a patch for this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 15:10:38 +00:00
Malcolm Tredinnick a584a6b40f Fixed #10071 -- Changed some internal database data representations.
We now pass numbers used in data queries as actualy numbers (integers) to the
database backends, rather than string forms. This is easier for some of the
less flexible backeds.

Based on a patch from Leo Soto and Ramiro Morales.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-12 02:00:58 +00:00
Malcolm Tredinnick d18f75af44 Fixed #10357 -- Fixed the "dbshell" command for Windows users.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-11 11:41:35 +00:00
Karen Tracey 48e01d2b3d Fixed up the introspection code and tests added for #9779 to run under Python 2.3, which has neither set nor rsplit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04 19:03:55 +00:00
Jacob Kaplan-Moss ef9bedf815 Fixed #9779: added support for relation detection to inspectdb under SQLite. Thanks, gabbott and ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-02 05:02:39 +00:00
Justin Bronn da3b38cdda Fixed #6064 -- Added the `connection_created` signal for when a database connection is created.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-29 23:15:58 +00:00
Justin Bronn 6e3b129f15 Fixed #9628 -- Use `pysqlite2` for database backend, if installed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10105 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-20 03:57:21 +00:00
Adrian Holovaty 315145f7ca Fixed #10459 -- Refactored the internals of database connection objects so that connections know their own settings and pass around settings as dictionaries instead of passing around the Django settings module itself. This will make it easier for multiple database support. Thanks to Alex Gaynor for the initial patch.
This is backwards-compatible but will likely break third-party database backends. Specific API changes are:

* BaseDatabaseWrapper.__init__() now takes a settings_dict instead of a settings module. It's called settings_dict to disambiguate, and for easy grepability. This should be a dictionary containing DATABASE_NAME, etc.

* BaseDatabaseWrapper has a settings_dict attribute instead of an options attribute. BaseDatabaseWrapper.options is now BaseDatabaseWrapper['DATABASE_OPTIONS']

* BaseDatabaseWrapper._cursor() no longer takes a settings argument.

* BaseDatabaseClient.__init__() now takes a connection argument (a DatabaseWrapper instance) instead of no arguments.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10026 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-11 03:39:34 +00:00
Karen Tracey addd3df3bd Fixed #7672 -- Added a 'week_day' lookup type. Many thanks to Ross Poulton for the proposal and implementation on all built-in database backends..
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-08 05:08:06 +00:00
Russell Keith-Magee cc4e4d9aee Fixed #3566 -- Added support for aggregation to the ORM. See the documentation for details on usage.
Many thanks to:
 * Nicolas Lara, who worked on this feature during the 2008 Google Summer of Code.
 * Alex Gaynor for his help debugging and fixing a number of issues.
 * Justin Bronn for his help integrating with contrib.gis.
 * Karen Tracey for her help with cross-platform testing.
 * Ian Kelly for his help testing and fixing Oracle support.
 * Malcolm Tredinnick for his invaluable review notes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15 11:06:34 +00:00
Karen Tracey 5f78eff909 Fixed #9814 -- Allowed SafeStrings to be saved to sqlite DB when running on Python 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16 14:28:22 +00:00
Malcolm Tredinnick 9d0bacebd2 Fixed #3501 -- Fixed date filtering in querysets for nullable date fields. Only
affects SQLite.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16 08:48:24 +00:00
Malcolm Tredinnick e99cd48769 Fixed #9113 -- Improved exception message reporting when importing sqlite3 fails.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 07:23:17 +00:00
Adrian Holovaty 42a878cfea db: Gave each DatabaseClient class an 'executable_name' attribute (e.g., 'psql' or 'mysql'), so that we can use it to make a more helpful error message. Refs #8978
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-09 02:13:58 +00:00
Jacob Kaplan-Moss 3a18002bbd Fixed #8210 and #8664: moved `USStateField` and `PhoneNumberField` to `django.contrib.localflavor.us`. This is a backwards-incompatible change, albeit a minor one; just add an aditional `import` and go on your way.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 22:15:35 +00:00
Malcolm Tredinnick 4f711eb5e3 Fixed #8347 -- Added a few missing field type conversion to SQLite's inspectdb
handling. Patch from trbs.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 08:58:07 +00:00
Malcolm Tredinnick 64ca36bf08 Fixed #8214 -- Added back a stringification that was dropped during [8131].
This restores filtering on dates in the admin, for example. Thanks to akfarrell
and a small team of workers at the Portland Sprint.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 18:01:16 +00:00
Russell Keith-Magee 7299b39752 Fixed #8355: Removed some whitespace that was apparently causing difficulty with script compilation. Thanks to bear330 for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 04:48:57 +00:00
Russell Keith-Magee 1691c22821 Fixed #8331 -- Added style parameter to sqlite backend implementation of sql_remove_table_constraints, missed in recent db backend refactor. Thanks to d00gs for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 07:35:47 +00:00
Russell Keith-Magee 9dc4ba875f Fixed #5461 -- Refactored the database backend code to use classes for the creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 12:11:25 +00:00
Jacob Kaplan-Moss 049d490875 Fixed #7921: for sqlite3 2.4.1 or later, adapt str objects to unicode, thus preveting weird failures with 8-bit bytestrings. Martin von Löwis and Karen Tracey tracked this one down -- thanks!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 23:59:01 +00:00
Malcolm Tredinnick b3b71a0922 Fixed #7560 -- Moved a lot of the value conversion preparation for
loading/saving interactions with the databases into django.db.backend. This
helps external db backend writers and removes a bunch of database-specific
if-tests in django.db.models.fields.

Great work from Leo Soto.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-29 05:09:29 +00:00
Malcolm Tredinnick 436ef181f3 Fixed #5552 -- Raise an error, rather than failing silently, when DATABASE_NAME
is not specified for SQLite.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 22:36:31 +00:00
Adrian Holovaty d261c1d000 Fixed #7805 -- Removed ImageField.get_internal_type() because it doesn't offer anything beyond FileField's implementation. Thanks, Gulopine
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 04:34:47 +00:00
Malcolm Tredinnick 3b37c8151a Fixed #7411 -- worked around some possible transaction conflicts in SQLite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-15 18:47:32 +00:00
Malcolm Tredinnick 9c52d56f6f Merged the queryset-refactor branch into trunk.
This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.

Fixed #245, #1050, #1656, #1801, #2076, #2091, #2150, #2253, #2306, #2400, #2430, #2482, #2496, #2676, #2737, #2874, #2902, #2939, #3037, #3141, #3288, #3440, #3592, #3739, #4088, #4260, #4289, #4306, #4358, #4464, #4510, #4858, #5012, #5020, #5261, #5295, #5321, #5324, #5325, #5555, #5707, #5796, #5817, #5987, #6018, #6074, #6088, #6154, #6177, #6180, #6203, #6658


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 02:50:16 +00:00
Jacob Kaplan-Moss 980fa8b827 Fixed #231: all fields that should take max_length now do. Thanks, Don Spaulding.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-19 23:33:57 +00:00
Ian Kelly f180d95903 Fixed #4896: fixed #4765: Patch for cursor.executemany using oracle and
sqlite3. Thanks, jdetaeye@www.frepple.com


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 21:32:25 +00:00
Adrian Holovaty 41576fea71 Fixed #5263 -- Updated docstring for sqlite3 backend. Thanks, Paul Bx
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6035 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-02 20:04:44 +00:00
Adrian Holovaty 14db37319b Refactored OPERATOR_MAPPING so that it exists as django.db.connection.operators instead of django.db.backend.OPERATOR_MAPPING. Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 03:26:55 +00:00
Adrian Holovaty 1a8f9b2b97 Implemented BaseDatabaseFeatures and changed all code to access it -- connection.features.foo instead of backend.foo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 02:20:33 +00:00
Adrian Holovaty a6a5e3cf32 Removed backend.dictfetchall(), as it wasn't being used anywhere
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 01:14:53 +00:00
Adrian Holovaty ba49e7be08 Removed backend.dictfetchmany(), as it wasn't being used anywhere
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 01:14:03 +00:00
Adrian Holovaty 1b4cfd4fea Removed backend.dictfetchone(), as it wasn't being used anywhere
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 01:13:12 +00:00
Adrian Holovaty 221f99ed58 Refactored quote_name() to DatabaseOperations.quote_name(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 01:03:33 +00:00
Adrian Holovaty 13061bf20b Refactored get_start_transaction_sql() to DatabaseOperations.start_transaction_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 00:24:03 +00:00
Adrian Holovaty 147e99a08a Refactored get_sql_sequence_reset() to DatabaseOperations.sequence_reset_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 00:21:10 +00:00
Adrian Holovaty aaed6e04ec Refactored get_sql_flush() to DatabaseOperations.sql_flush(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 00:15:53 +00:00
Adrian Holovaty c44fb66551 Refactored get_random_function_sql() to DatabaseOperations.random_function_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5962 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20 00:04:20 +00:00
Adrian Holovaty aaf8760227 Refactored get_pk_default_value() to DatabaseOperations.pk_default_value(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:59:06 +00:00
Adrian Holovaty e4b7e369dd Refactored get_max_name_length() to DatabaseOperations.max_name_length(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:53:39 +00:00
Adrian Holovaty d3e69c3a47 Refactored get_limit_offset_sql() to DatabaseOperations.limit_offset_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:24:59 +00:00
Adrian Holovaty 5ce050a5f5 Refactored get_last_insert_id() to DatabaseOperations.last_insert_id(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:18:43 +00:00
Adrian Holovaty 5a6426448f Refactored get_fulltext_search_sql() to DatabaseOperations.fulltext_search_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:13:06 +00:00
Adrian Holovaty 23a736dca9 Refactored get_drop_foreignkey_sql() to DatabaseOperations.drop_foreignkey_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:07:34 +00:00
Adrian Holovaty 8e84d35d38 Refactored get_deferrable_sql() to DatabaseOperations.deferrable_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 23:03:38 +00:00
Adrian Holovaty 29f67dce9e Refactored get_datetime_cast_sql() to DatabaseOperations.datetime_cast_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 22:55:05 +00:00
Adrian Holovaty 5f51f0524a Refactored get_date_trunc_sql() to DatabaseOperations.date_trunc_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 22:47:43 +00:00
Adrian Holovaty aab04a4c2f Refactored get_date_extract_sql() to DatabaseOperations.date_extract_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 22:40:06 +00:00
Adrian Holovaty 38b5d7f23d Began implementing BaseDatabaseOperations class for every database backend. This class will be used to hold the database-specific methods that currently live at the module level in each backend. Only autoinc_sql() has been implemented so far.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 22:29:57 +00:00
Adrian Holovaty 7c41b19c8a Refactored all database backends to inherit from a common base class to remove quite a bit of duplicated code. Thanks for the patch, Brian Harring. Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 21:30:57 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Adrian Holovaty ac2b9f2a3f Added a db_type() method to the database Field class. This is a hook for calculating the database column type for a given Field. Also converted all management.py CREATE TABLE statements to use db_type(), which made that code cleaner. The Field.get_internal_type() hook still exists, but we should consider removing it at some point, because db_type() is more general. Also added docs -- the beginnings of docs on how to create custom database Field classes. This is backwards-compatible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 06:28:56 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Jacob Kaplan-Moss 24512a74be Fixed #1465: added support for regex lookups. Thanks, Tom Tobin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-27 18:58:10 +00:00
Malcolm Tredinnick ac64e91a0c Merged boulder-oracle-sprint branch (r3965:5512) back into trunk. All
expected tests pass for all databases.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 14:16:00 +00:00
Malcolm Tredinnick 92c35a0617 Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the code
to return Decimal instances in Python for this field. Backwards incompatible
change.

Added a real FloatField (stores floats in the database) and support for
FloatField and DecimalField in newforms (analogous to IntegerField).

Included decimal.py module (as django.utils._decimal) from Python 2.4. This is
license compatible with Django and included for Python 2.3 compatibility only.

Large portions of this work are based on patches from Andy Durdin and Jorge
Gajon.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21 01:29:58 +00:00
Malcolm Tredinnick b3e0b59def Fixed #3450 -- Exposed IntegrityError in a backend-neutral fashion. This is a
useful error to be able to catch explicitly. Thanks, enlight.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-25 10:18:56 +00:00
Russell Keith-Magee dabd96646c Fixed #3790 -- Fixed a problem with sequence resetting during fixture loads when using Postgres. Thanks to Jon Ballard and scott@staplefish.com for the report, and to Zach Thompson for suggesting a solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-06 02:25:58 +00:00
Malcolm Tredinnick cc8d656569 Fixed #3024 -- Fixed database commit() and rollback() behaviour so it works
consistently if you execute them before Django has made a database connection.
Thanks Bastian Kleineidam.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4691 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-09 07:55:40 +00:00
Russell Keith-Magee f2582eb972 Fixes #2333 -- Added test fixtures framework.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-01 13:11:08 +00:00
Jacob Kaplan-Moss 51f39d59bd Fixed #3390: the serializer can now contain forward references. Thanks, Russ.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 17:33:27 +00:00
Jacob Kaplan-Moss f6390e8983 Fixed #1477: URLFields now accept a maxlength parameter. Thanks, Matt Croydon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-08 20:28:31 +00:00
Jacob Kaplan-Moss fef89a01c5 Fixed #2866: Added DATABASE_OPTIONS setting which gets passed as extra kwargs to the backend's connect method. Thanks, ymasuda.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4048 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-07 05:17:38 +00:00
Malcolm Tredinnick b4e5a96ccc Fixed #2772 -- Made SQLite support work correctly with Python 2.5 standard
module (as well as pysqlite2 for earlier Python versions). Patch from
ymasuda[at]ethercube.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25 01:53:34 +00:00
Russell Keith-Magee 6f87b17a0d Fixes #2658 -- Modified SQLite cursor close() method for in-memory databases, making the lifespan of an in-memory database equal to the life of the process, rather than the life of the cursor. Thanks, Ned Batchelder.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-05 13:32:08 +00:00
Jacob Kaplan-Moss 17d0bd1512 Fixed a bunch of spurious imports, typos, and other small errors turned up by a pass through PyFlakes. This covers about the first third of the errors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21 17:11:13 +00:00
Adrian Holovaty 49e5f5450d Fixed #2272 -- Improved SQLite database introspection. Thanks, dne@mayonnaise.net
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-07 04:06:00 +00:00
Malcolm Tredinnick 7e2b888a2d Fixed #2108 -- allow saving of empty models, rather than just dropping them.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 15:14:06 +00:00
Adrian Holovaty 168429d597 Fixed #593 -- Added 'search' DB-API lookup type, which does full-text index searches in MySQL
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 23:28:24 +00:00
Adrian Holovaty 8e9833f261 Fixed #1673 -- Every database backend now raises ImproperlyConfigured if the relevant Python database module raises ImportError
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 18:58:46 +00:00
Adrian Holovaty eb4bbbb6f3 Fixed #1777 -- Fixed bug in date conversion in SQLite backend. Thanks, dart@google.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 03:27:49 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00