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)
|
||||
|
||||
|
||||
@contextmanager
|
||||
def session_scope():
|
||||
from accountant import db
|
||||
|
@ -23,9 +23,9 @@ from accountant import session_scope
|
||||
from . import auth
|
||||
from .. import api
|
||||
|
||||
from ..model.accounts import Account
|
||||
from ..model.entries import Entry
|
||||
from ..model.operations import Operation
|
||||
from ..models.accounts import Account
|
||||
from ..models.entries import Entry
|
||||
from ..models.operations import Operation
|
||||
|
||||
|
||||
@api.route("/accounts", methods=["GET"])
|
||||
|
@ -20,8 +20,8 @@ from accountant import session_scope
|
||||
|
||||
from .. import api
|
||||
|
||||
from ..model.entries import Entry
|
||||
from ..model.operations import Operation
|
||||
from ..models.entries import Entry
|
||||
from ..models.operations import Operation
|
||||
|
||||
|
||||
@api.route("/entries/<account_id>/<year>/<month>")
|
||||
|
@ -18,8 +18,9 @@ from flask import json, request
|
||||
|
||||
from accountant import session_scope
|
||||
|
||||
from ..models.scheduled_operations import ScheduledOperation
|
||||
|
||||
from .. import api
|
||||
from ..model.scheduled_operations import ScheduledOperation
|
||||
|
||||
|
||||
@api.route("/scheduled_operations/<account_id>")
|
||||
|
Loading…
Reference in New Issue
Block a user