You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,15 @@ _to see this in a real world example take a look at my other projects_ [Flask-Cm
17
17
- 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!!
18
18
19
19
- 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
21
29
22
30
- baseviews.py
23
31
- 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