mirror of
https://github.com/Llloooggg/TextSouls.git
synced 2026-03-06 04:26:23 +03:00
backend: полная реструктуризация
This commit is contained in:
0
backend/textsouls/common/__init__.py
Normal file
0
backend/textsouls/common/__init__.py
Normal file
@@ -1,8 +1,16 @@
|
||||
from .. import db
|
||||
|
||||
from flask import request
|
||||
from flask.views import MethodView
|
||||
|
||||
from flask_admin.contrib.sqla import ModelView
|
||||
|
||||
from textsouls import db
|
||||
|
||||
|
||||
class CommonAdminView(ModelView):
|
||||
def __init__(self, model, *args, **kwargs):
|
||||
self.column_list = [c.key for c in model.__table__.columns]
|
||||
super(CommonAdminView, self).__init__(model, *args, **kwargs)
|
||||
|
||||
|
||||
class ItemAPI(MethodView):
|
||||
init_every_request = False
|
||||
Reference in New Issue
Block a user