Generic CRUD admin for Flask, with WTForms?

Is there a generic CRUD admin for Flask based on WTForms?

We are currently creating a hybrid backend system in which the administrator must CRUD a lot of data from different sources, MongoDB, Redis, ini file, ENVIRON, etc. Writing a specific administrative view for each of them seems like a waste of time, but all Flask admin or WTForms are based on some kind of fixed ORM, for example MongoEngine, AppEngine Datastore, SQLAchemy, etc.

Are there more general methods for automatically generating an ORM-agnostic admin?

I need it to provide the following functions

  • viewing the list for a group of elements, supporting inline editing or batch actions will be great!
  • edit view for one specific item to add / edit

Just define some model of the model, implement the iteration method and automatically create a full-fledged administrator.

Are there reusable OSS projects?

+5
source share
3 answers

The short answer is no, as far as I know, there is no automatic ORM generation for redis or MongoDB.

Now for a more detailed explanation:

The reason that there is CRUD generation for "fixed" ORMs rather than free-form data storage is simple: the very nature of free-form records makes it difficult to create a schema.

, , redis, , , . key 'user- {id}' , _. , , "" ? , redis , , , . .

CRUD, , . , , , , , -1 "location"? CRUD .

, redis , CRUD , "", , , register_on ISO.

, , MongoDB ! , , , , , - CRUD? , , Redis, , , , . , . , (textarea) ( = ) ?

- CRUD , "" ( , ?) , , , /, CRUD , , / .

"" CRUD , , - .

+2

:

https://github.com/sbook/flask-mongoengine

https://github.com/coleifer/flask-peewee

You can take the skeleton-flagged mongoengine and the port administrator coleifer from flask-peewee to it. I do not think that would be too difficult. The Coleifer admin gets extra points for using twitter-bootstrap, and I can tell you that he is very sensitive to problems.

I worked with mongoengine on the flask as well as sausage, and both are excellent.

+3
source

All Articles