halfapi/halfapi/db.py
2020-07-24 17:41:25 +02:00

13 lines
399 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
from halfapi.conf import DB_NAME
# DB
from half_orm.model import Model
db = Model(DB_NAME)
Domain = db.get_relation_class('api.domain')
APIRouter = db.get_relation_class('api.router')
APIRoute = db.get_relation_class('api.route')
AclFunction = db.get_relation_class('api.acl_function')
Acl = db.get_relation_class('api.acl')
RouteACL = db.get_relation_class('api.view.acl')