Rename model into models to be compliant with views name.
This commit is contained in:
parent
c411ce5328
commit
afd3ad005b
@ -31,6 +31,7 @@ app.config['SECRET_KEY'] = 'my_secret_key'
|
|||||||
|
|
||||||
db = SQLAlchemy(app)
|
db = SQLAlchemy(app)
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def session_scope():
|
def session_scope():
|
||||||
from accountant import db
|
from accountant import db
|
||||||
|
@ -23,9 +23,9 @@ from accountant import session_scope
|
|||||||
from . import auth
|
from . import auth
|
||||||
from .. import api
|
from .. import api
|
||||||
|
|
||||||
from ..model.accounts import Account
|
from ..models.accounts import Account
|
||||||
from ..model.entries import Entry
|
from ..models.entries import Entry
|
||||||
from ..model.operations import Operation
|
from ..models.operations import Operation
|
||||||
|
|
||||||
|
|
||||||
@api.route("/accounts", methods=["GET"])
|
@api.route("/accounts", methods=["GET"])
|
||||||
|
@ -20,8 +20,8 @@ from accountant import session_scope
|
|||||||
|
|
||||||
from .. import api
|
from .. import api
|
||||||
|
|
||||||
from ..model.entries import Entry
|
from ..models.entries import Entry
|
||||||
from ..model.operations import Operation
|
from ..models.operations import Operation
|
||||||
|
|
||||||
|
|
||||||
@api.route("/entries/<account_id>/<year>/<month>")
|
@api.route("/entries/<account_id>/<year>/<month>")
|
||||||
|
@ -18,8 +18,9 @@ from flask import json, request
|
|||||||
|
|
||||||
from accountant import session_scope
|
from accountant import session_scope
|
||||||
|
|
||||||
|
from ..models.scheduled_operations import ScheduledOperation
|
||||||
|
|
||||||
from .. import api
|
from .. import api
|
||||||
from ..model.scheduled_operations import ScheduledOperation
|
|
||||||
|
|
||||||
|
|
||||||
@api.route("/scheduled_operations/<account_id>")
|
@api.route("/scheduled_operations/<account_id>")
|
||||||
|
Loading…
Reference in New Issue
Block a user