SQLAlchemy model backend integration examples.
To run this example:
Clone the repository:
git clone https://github.com/flask-admin/flask-admin.git cd flask-admin
Create and activate a virtual environment:
virtualenv env source env/bin/activate
Install requirements:
pip install -r 'examples/geo_alchemy/requirements.txt'
Setup the database:
psql postgres CREATE DATABASE flask_admin_geo; CREATE ROLE flask_admin_geo LOGIN PASSWORD 'flask_admin_geo'; GRANT ALL PRIVILEGES ON DATABASE flask_admin_geo TO flask_admin_geo; \q psql flask_admin_geo CREATE EXTENSION postgis; \q
Run the application:
python examples/geo_alchemy/app.py
6. You will notice that the maps are not rendered. To see them, you will have to register for a free account at Mapbox and set the MAPBOX_MAP_ID and MAPBOX_ACCESS_TOKEN config variables accordingly.