diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-07-20 06:28:56 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-07-20 06:28:56 +0000 |
| commit | ac2b9f2a3fd2a6c8dd3f87a6302b7d3f2ef73a0a (patch) | |
| tree | 478a813ed7eaa4fae4f69c0e497b68df93916dbe /django/db/backends/postgresql/creation.py | |
| parent | f5ef3bec6868cc4e04f2a7816821a44ec104c923 (diff) | |
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
Diffstat (limited to 'django/db/backends/postgresql/creation.py')
| -rw-r--r-- | django/db/backends/postgresql/creation.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py index 4646b68ab8..fde094de7f 100644 --- a/django/db/backends/postgresql/creation.py +++ b/django/db/backends/postgresql/creation.py @@ -16,7 +16,6 @@ DATA_TYPES = { 'ImageField': 'varchar(100)', 'IntegerField': 'integer', 'IPAddressField': 'inet', - 'ManyToManyField': None, 'NullBooleanField': 'boolean', 'OneToOneField': 'integer', 'PhoneNumberField': 'varchar(20)', |
