mirror of
https://github.com/django/django.git
synced 2025-11-01 04:17:59 +00:00
Fixed #22001 -- Ensure db_type is respected.
db_parameters should respect an already existing db_type method and return that as its type string. In particular, this was causing some fields from gis to not be generated. Thanks to @bigsassy and @blueyed for their work on the patch. Also fixed #22260
This commit is contained in:
parent
37f7f233f5
commit
d22b291890
8 changed files with 105 additions and 15 deletions
|
|
@ -74,3 +74,8 @@ class JSONField(six.with_metaclass(models.SubfieldBase, models.TextField)):
|
|||
if value is None:
|
||||
return None
|
||||
return json.dumps(value)
|
||||
|
||||
|
||||
class CustomTypedField(models.TextField):
|
||||
def db_type(self, connection):
|
||||
return 'custom_field'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue