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
Gary Wilson Jr
193e6db457
Refs #2591 -- Removed int conversion and try/except since the value in the single-item list is already an int. I overlooked this in my original patch, which was applied in [5679].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 20:36:01 +00:00
Malcolm Tredinnick
54a71805aa
Fixed #2591 -- Fixed a problem with inspectdb with psycopg2 (only). Patch from
...
Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 08:52:07 +00:00
Malcolm Tredinnick
671fb8aa53
Fixed #4770 -- Fixed some Unicode conversion problems in the mysql_old backend
...
with old MySQLdb versions. Tested against 1.2.0, 1.2.1 and 1.2.1p2 with only
expected failures.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-06 08:04:04 +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
Russell Keith-Magee
4a892f4d86
Fixed #4689 -- Added some missing methods to the dummy backend. Thanks for the report, Forest Bond.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-28 02:52:54 +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
14161dba6b
Fixed #4678 -- Fixed table name matching during syncdb for pyscopg2 backend
...
(the psycopg backend was already correct). Patch from tailofthesun@gmail.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-25 03:08:00 +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
86fd59cfa5
Fixed #4432 -- Fixed PostgreSQL sequence resetting in the case when a table has
...
no rows yet. Thanks, mrmachine.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-10 03:31:26 +00:00
Malcolm Tredinnick
6fc10f50b0
Fixed #4518 -- Added handling of empty strings in typecast_decimal() for
...
SQLite's benefit. Thanks, Richard House.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-10 01:52:56 +00:00
Simon Willison
4cda993213
rollback on dummy database now has no effect (previously raised an error). This means that custom 500 error pages (and e-mailed exceptions) now work even if a database has not been configured. Fixes #4429 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-01 16:30:38 +00:00
Malcolm Tredinnick
9eada8ad62
Fixed #4357 -- Removed a type conversion that was only introduced in
...
MySQLdb-1.2.1 (and was introduced to Django in [5302]).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-22 04:31:19 +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
Russell Keith-Magee
fd17163481
Fixed #4231 -- Added quoting for sequence names on sequence reset for PostgreSQL. This was causing difficulties if table or application names were capitalized. Thanks for the report, Mark Jarecki.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-12 15:21:33 +00:00
Malcolm Tredinnick
439cb4047f
Fixed #4040 -- Changed uses of has_key() to "in". Slight performance
...
improvement and forward-compatible with future Python releases. Patch from Gary
Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 13:30:48 +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
Malcolm Tredinnick
eb107e1ae9
Fixed #4048 -- When introspecting a MySQL database, map CHAR(n) fields to
...
Django's CharField type, not TextField. Thanks, Bill Fenner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-20 10:05:39 +00:00
Russell Keith-Magee
c5f08954d5
Fixed #4057 -- Fixed problem with quoting of sequence names on Postgres backends. Thanks, Gary Wilson.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-17 11:11:26 +00:00
Russell Keith-Magee
07f599ca5c
Fixed the ADO backend to match the required interface and normalized naming of parameters.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-06 02:27:18 +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
3f3f51d942
Fixed a mistaken import from the mysql backend that had snuck through.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4768 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-21 20:44:15 +00:00
Malcolm Tredinnick
dcc8442390
Added a mysql_old backend that matches the mysql backend prior to [4724]. This
...
is only for backwards compatibility purposes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-21 03:27:03 +00:00
Malcolm Tredinnick
1f9711ffb0
Fixed #3754 -- Re-introduced utf-8 as default encoding for interaction with
...
MySQL backend (a side-effect of [4724]). Thanks Andy Dustman and Michael
Radziej.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-20 23:32:39 +00:00
Malcolm Tredinnick
cb624b1377
Fixed #3747 -- Added a stricter MySQLdb version check so that (1, 2, 1,
...
'final', 2) passes and (1, 2, 1, 'gamma') does not. Also fixed a problem in the
error reporting when the check fails.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-18 19:16:47 +00:00
Malcolm Tredinnick
f9c4ce5123
Fixed #2635 -- Added improved MySQL backend support from Andy Dustman. Also
...
added database.txt documentation; currently only describing Django-related
features of MySQL versions.
As of this commit, there are four known test failures due to (a) no transaction
support with MyISAM storage engine and (b) MySQLdb automatically creating
decimal types for Django's "float" field.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-14 12:08:19 +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
Malcolm Tredinnick
dd99bc7d02
Fixed #3627 -- Made [4659] compatible with Python 2.3. Thanks, Gary Wilson.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-02 05:15:27 +00:00
Jacob Kaplan-Moss
a72f908924
Changed the postgres version getting code to use cursor.fetchone() instead of dictfetchone(); some versions (including mine) of psycopg don't export dictfetch functions.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-01 17:54:35 +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
dcdaa4ac3c
Fixed #3459 : Django no longer runs SET TIME ZONE for every query when using Postgres. This should result in a pretty noticible speedup for Postgres users, so many thanks to Jack Moffitt for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-25 16:18:46 +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
Adrian Holovaty
f21cbb40b2
Fixed #3151 -- Improved MySQL backend not to send 'SET NAMES utf8' before every query. Thanks for the patch, smurf@smurf.noris.de
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 07:21:01 +00:00
Adrian Holovaty
d681b084c3
Fixed #3205 -- Fixed bug in custom postgresql executemany wrapper. Thanks for reporting, jeffreyz@broadpark.no
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-29 19:01:29 +00:00
Adrian Holovaty
252606c711
Fixed #3115 -- Changed postgresql backend to convert all Unicode strings to bytestrings according to DEFAULT_CHARSET. This is necessary because psycopg1 does not apply database quoting to Unicode strings
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 05:14:02 +00:00
Adrian Holovaty
a23e67bf4b
Improved error message in postgresql backend
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 22:32:16 +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
Jacob Kaplan-Moss
86143f7599
Fixed #2913 : CursorDebugWrapper no longer double-tuple-izes parameters. Thanks, artdent@freeshell.org
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-07 05:00:19 +00:00
Malcolm Tredinnick
a834f213bd
Fixed omission in [3872].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-27 02:47:19 +00:00
Malcolm Tredinnick
6068f3e4cb
Reintroduced the changes from [3855] with more flexible handling of version
...
strings. Refs #2188 , #2827 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-27 02:42:31 +00:00
Adrian Holovaty
a07aafe007
Removed one more legacy bit from [3855]. Refs #2827 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3868 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 16:14:06 +00:00
Adrian Holovaty
38d80f8894
Fixed #2827 -- Reverted [3855]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 16:11:13 +00:00
Malcolm Tredinnick
4e76727fec
Fixed #2188 -- Raise an error when using long CharFields in combination with
...
older MySQL versions. Thanks, Fraser Nevett <mail@nevett.org> .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 10:46:34 +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
Malcolm Tredinnick
4f63ce5b4a
Fixed #2662 -- Changed dictfetchmany and dictfetchall to return iterators,
...
rather than a list, in order to save memory. Patch from Simon Willison.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-22 02:36:50 +00:00
Adrian Holovaty
ecf6a35112
Fixed #2700 -- Improved introspection for MySQL. Thanks for the patch, serbaut@gmail.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-11 18:41:05 +00:00
Adrian Holovaty
521c6a2652
Fixed #2699 -- Added quote_name() call to MySQL introspection.py. Thanks for the patch, serbaut@gmail.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-11 18:31:46 +00:00
Jacob Kaplan-Moss
6152b325aa
Made psycopg2 backend actually support dictfetch* methods.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-05 16:12:36 +00:00