Add field definition
issue8037 review58501002
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user