Add SQLAlchemy and database boilerplate code
This commit is contained in:
parent
2da6e43797
commit
31df889dcb
15 changed files with 454 additions and 60 deletions
|
|
@ -1,14 +1,15 @@
|
|||
from flask import Blueprint
|
||||
|
||||
from tofu_api.common.rest import BaseBlueprint
|
||||
from .tasks import TaskApiBlueprint
|
||||
|
||||
|
||||
class TofuApiBlueprint(Blueprint):
|
||||
class TofuApiBlueprint(BaseBlueprint):
|
||||
"""
|
||||
Main blueprint for the Tofu REST API.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__('rest_api', __name__, url_prefix='/api')
|
||||
name = 'rest_api'
|
||||
import_name = __name__
|
||||
url_prefix = '/api'
|
||||
|
||||
self.register_blueprint(TaskApiBlueprint())
|
||||
def init_blueprint(self) -> None:
|
||||
self.register_blueprint(TaskApiBlueprint(self.app))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue