Add field definition

issue8037
review58501002
This commit is contained in:
Cédric Krier
2019-02-13 10:37:18 +01:00
parent 18e63534dd
commit 381b86c3c1
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -1,3 +1,5 @@
* Add dimension and geometry type in field definition
Version 5.0.0 - 2018-10-01
* Bug fixes (see mercurial logs for details)
* Add support for Python 3.7
+6
View File
@@ -51,6 +51,12 @@ class Geometry(fields.Field):
return expression
def definition(self, model, language):
definition = super().definition(model, language)
definition['dimension'] = self.dimension
definition['geometry_type'] = self.geometry_type
return definition
class Point(Geometry):
_geometry_type = 'POINT'