Skip to content

Commit 44f1828

Browse files
committed
Update README.md
1 parent 10cc95d commit 44f1828

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ _to see this in a real world example take a look at my other projects_ [Flask-Cm
1717
- any blueprints listed in your settings under `BLUEPRINTS` will be imported and registered on your app and if that blueprint is a package any files it contains named `models.py` or `views.py` will be imported as well, so no more need to manually import your views and models giving odd errors if you dont do it in the exact correct order!!
1818

1919
- basemodels.py
20-
- with a BaseMixin class that provides many useful CRUD operations, IE: model.save(), model.delete()
20+
- with a sqlalchemy compatible BaseMixin class
21+
- provides many useful CRUD operations, IE: model.save(), model.delete()
22+
- BaseMixin generates __tablename__ automaticlly
23+
- BaseMixin adds an auto incrementing `id` field, as the primary_key to each model
24+
- BaseMixin.session is current model classes session
25+
- BaseMixin.engine is the current db engine
26+
- BaseMixin.query is the models sqlalchemy query from its session
27+
- BaseMixin.get_all() -> function to return all of a model
28+
- BaseMixin.get(*args,**kwargs) -> get single model by attr values, mainly for id=x
2129

2230
- baseviews.py
2331
- with a BaseView class that is subclassed from Flask.views.MethodView to allow easy definition of view responses to get and post requests.

0 commit comments

Comments
 (0)