GeoAlchemy comes with a `Geometry`_ field that is carefully divorced from the
GeoAlchemy comes with a `Geometry`_ field that is carefully divorced from the
`Shapely`_ library. Flask-Admin takes the approach that if you're using spatial
`Shapely`_ library. Flask-Admin will use this field so that there are no changes necessary to other code. ``ModelView`` should be imported from ``geoa`` rather than the one imported from ``sqla``::
objects in your database, and you want an admin interface to edit those objects,
you're probably already using Shapely, so we provide a Geometry field that is
from geoalchemy2 import Geometry
integrated with Shapely objects. To make your admin interface works, be sure to
from flask.ext.admin.contrib.geoa import ModelView
use this field rather that the one that ships with GeoAlchemy when defining your
models::
from flask.ext.admin.contrib.geoa.sqltypes import Geometry