dpgaspar / Flask-AppBuilder

Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
BSD 3-Clause "New" or "Revised" License
4.69k stars 1.36k forks source link

Feature: Add support for read-only database views without primary key column #1830

Open rob-hills opened 2 years ago

rob-hills commented 2 years ago

Databases like Postgres provide SQL Views which can be read-only.

While these can be represented withinin a Flask App, they take quite a lot of extra work compared with adding a CRUD table, mainly to remove all the editing functionality that comes with the default CRUD Model and ModelView base classes.

I would like to see a ReadOnlyModel base class (or similar) that can be linked to a View within a database and which doesn't enforce a primary key column or provide any data editing functionality.

dpgaspar commented 2 years ago

it's an interesting idea, but not on the roadmap now. Feel free to open a PR