Opened 14 years ago
Closed 13 years ago
#15169 closed Bug (fixed)
With gis.mysql backend BooleanField convert to Python as 1|0 instead of True|False
Reported by: | zmsmith | Owned by: | Carl Meyer |
---|---|---|---|
Component: | GIS | Version: | 1.2 |
Severity: | Release blocker | Keywords: | BooleanField, GIS, |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Using the django.contrib.gis.db.backends.mysql database backend, BooleanField are retrieved as 1 or 0 instead of proper python True or False
Attachments (2)
Change History (19)
comment:1 by , 14 years ago
Summary: | With gis.mysql backend BooleanField convert to Python as 1|0 instead of Treu|False → With gis.mysql backend BooleanField convert to Python as 1|0 instead of True|False |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 14 years ago
Attachment: | 15169.1.diff added |
---|
comment:4 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
So, I wasn't aware that Django's MySQL backend got its own compiler module last spring -- thus, proper subclasses need to be created in django.contrib.gis.db.backends.mysql.compiler
.
My initial patch fixes the problem, and moves the actual value conversion in the MySQL backend to convert_values
-- this is consistent with the approach taken in Oracle's backend, and makes it easier for GeoDjango to use. However, this initial patch causes a regression in GeoDjango's relatedapp
tests, but this could be related to #15040.
comment:5 by , 14 years ago
milestone: | → 1.3 |
---|
comment:6 by , 14 years ago
milestone: | 1.3 → 1.4 |
---|
This is not a blocker, and is being pushed to 1.4 at latest (most likely a bug fix in 1.3.X after release).
comment:7 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:4 by , 13 years ago
Severity: | Normal → Release blocker |
---|
comment:13 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:14 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
by , 13 years ago
Attachment: | 15169.2.diff added |
---|
New attempt, using a strategy similar to the one used by the main MySQL DB backend
Might be related to #15040
Replicated on 1.3.0 alpha