talelin / lin-cms-flask-core Goto Github PK
View Code? Open in Web Editor NEWA simple and practical CMS implememted by flask
License: MIT License
A simple and practical CMS implememted by flask
License: MIT License
当前版本未同步到PyPI,导致Lin-cms-flask 安装的依赖Lin-CMS不匹配
def init_app(
self,
app,
group_model=None,
user_model=None,
identity_model=None,
permission_model=None,
group_permission_model=None,
user_group_model=None,
jsonencoder=None,
sync_permissions=True,
mount=True,
handle=True,
syslogger=True,
):
# load default lin db model if None
if not group_model:
from .model import Group
group_model = Group
if not user_model:
from .model import User
self.user_model = User
if not permission_model:
from .model import Permission
permission_model = Permission
if not group_permission_model:
from .model import GroupPermission
group_permission_model = GroupPermission
这里self..user_model,不应该有self,否则下面初始化manager的时候有问题
id = StringField(label="id", validators=[Optional(), AnyOf(values=["1","2","3"])])
当可选参数id,传值时,id=4,如果不在Anyof内,原生的form.id.data=None, 封装后的form.id.data=4
[SQL: INSERT INTO lin_user_identity (delete_time, is_deleted, user_id, identity_type, identifier, credential) VALUES (%(delete_time)s, %(is_deleted)s, %(user_id)s, %(identity_type)s, %(identifier)s, %(credential)s) RETURNING lin_user_identity.id]
[parameters: {'delete_time': None, 'is_deleted': False, 'user_id': 1, 'identity_type': 'USERNAME_PASSWORD', 'identifier': None, 'credential': 'pbkdf2:sha256:260000$L661sSOrTEiLxWsG$49288ec31c6fd650dbfed174572f0a28d713b0a4b06cebe5172e4b00a653e07a'}]
(Background on this error at: https://sqlalche.me/e/14/9h9h)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.DatatypeMismatch) column "mount" is of type smallint but expression is of type boolean
LINE 1: ..., mount) VALUES (NULL, false, '删除图书', '图书', true),(NUL...
^
HINT: You will need to rewrite or cast the expression.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.