manage.py inspectdb guesses TextField on postgres' real column
Using python manage.py inspectdb outputs a models.TextField type as guess for every 'real' (float4) column when using postgresql (psycopg2). Example:
modifier_float = models.TextField() # This field type is a guess.
Quick fix: Append "700: 'FloatField'" to postgres' introspection.py's data_types_reverse dict. SVN is acting weird and I don't really know django's underlying codebase, so I rather let someone else patch this (or explain why it's intended).
Attachments
(1)
- 9991.patch
(477 bytes
) - added by Peter Bengtsson 16 years ago.
- The patch. Only tested this manually. Working on how to write tests for this.
Download all attachments as:
.zip
Change History
(9)
Description: |
modified (diff)
|
milestone: |
→ 1.1
|
Triage Stage: |
Unreviewed → Accepted
|
Component: |
Uncategorized → django-admin.py inspectdb
|
Owner: |
changed from nobody to Peter Bengtsson
|
Status: |
new → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Resolution: |
fixed
|
Status: |
closed → reopened
|
Resolution: |
→ fixed
|
Status: |
reopened → closed
|
(edited description)