refactored models package back to modules

email
androiddrew 7 years ago
parent 83d560685a
commit 610b6e1056

@ -1,3 +1,3 @@
from cookie_api.renders import JSONRenderer
from cookie_api.models.schema import Base
from cookie_api.app import application_factory
from cookie_api.models import Base

@ -4,13 +4,10 @@ from apistar.backends.sqlalchemy_backend import Session
from apistar.frameworks.wsgi import WSGIApp as App
from apistar.handlers import docs_urls, static_urls
from apistar.interfaces import Router, Injector, Auth
from apistar_jwt.authentication import JWTAuthentication
from cookie_api.commands import commands
from cookie_api.models.schema import Cookie
from cookie_api.auth import auth_routes, auth_components
from cookie_api.commands import commands
from cookie_api.models import Cookie
@annotate(authentication=[JWTAuthentication()])

@ -1,10 +1,10 @@
import datetime as dt
from apistar import Component, Settings, http, Route, Include
from apistar.backends.sqlalchemy_backend import Session
from apistar_jwt.authentication import get_jwt
from apistar_jwt.token import JWT
from .models.schema import User
from cookie_api.models import User
# /auth/register
# /auth/user
@ -14,7 +14,7 @@ from .models.schema import User
auth_components = [
Component(JWT, init=get_jwt)
]
[]
# /auth/login
def login(settings: Settings, json_data: http.RequestData, session: Session):

@ -1,7 +1,7 @@
from apistar import Command
from apistar.backends.sqlalchemy_backend import Session
from cookie_api.models.schema import User
from cookie_api.models import User
def create_user(session: Session, email, password):

Loading…
Cancel
Save