gothinkster/flask-realworld-example-app

CRUD Mixin

rustanacexd opened this issue · 2 comments

Is there any reason you are not using the popular CRUD mixin? or its because of the rollbacks on your views? i'm learning your codebase and its very similar to https://github.com/sloria/cookiecutter-flask and they use that mixin i'm just wondering.

see screenshot http://take.ms/E17UT

I'm gonna close this but we can use this thread to chat, the model_class is indeed CRUDMixin https://github.com/gothinkster/flask-realworld-example-app/blob/master/conduit/extensions.py#L12 I'm passing it to the as a model_class since you can change the declarative base class, I'm doing this so that I don't have to inherit from CRUDMixin every time (see this https://github.com/gothinkster/flask-realworld-example-app/blob/master/conduit/database.py#L11) generally you don't want to use that mixin, sqlalchemy follows the data mapper pattern we are making it behave like an active record which is not a very good idea, and yes I generated the project skeleton with sloria's cookiecutter.

gotcha! thank you for the response, best flask codebase on api i've seen so far