bugfix
This commit is contained in:
parent
134cb90a1c
commit
903c3eef56
@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
## ui, dspy可以直接使用的变量
|
|
||||||
|
|
||||||
### request
|
|
||||||
aiohttp.Request实例,每个客户端请求有一个独立的Request实例
|
|
||||||
|
|
||||||
request._run_ns可以获得所有在.ui和.dspy源码中可以使用的变量,通过ahserver.ServerEnv 传递
|
|
||||||
|
|
||||||
### params_kw
|
|
||||||
DictObject(dict子类, 支持a.b方式获取属性)实例,接收到客户端传来的数据,如果有文件>,文件都保存在服务器指定的位置,params_kw中属性名保存的是其相对路径,可用FileStorage().realPath(params_kw.myfile)来获得文件在服务器中的实际路径。
|
|
||||||
|
|
||||||
### get_user()
|
|
||||||
来自rbac模块,协程函数,获得当前登录用户,如果用户没有登录,返回None
|
|
||||||
|
|
||||||
### get_userorgid()
|
|
||||||
来自rbac模块,协程函数,获得当前登录用户的机构id,如果用户没有登录,返回None
|
|
||||||
|
|
||||||
## pyproject.toml和README.md
|
|
||||||
编写pyproject.toml文件和README.md文件
|
|
||||||
|
|
||||||
## 模块中使用的编码
|
|
||||||
模块中如果用到编码,编码需保存在appbase模块的appcodes表和appcodes_kv两个表中
|
|
||||||
appcodes(编码表)有如下字段:
|
|
||||||
[
|
|
||||||
"id" # str 32, 主键,可设置为数据表字段名称
|
|
||||||
"name" # 编码名称
|
|
||||||
"hierarchy_flg", # str 1, '0':单级编码,“1”:多级编码
|
|
||||||
]
|
|
||||||
appcodes_kv(编码键值表)字段如下
|
|
||||||
[
|
|
||||||
"id", # str, 32,主键,唯一值
|
|
||||||
"parentid" # str, 32, 一级编码为appcodes表的id, 否则为上级编码键值记录的id
|
|
||||||
“k" # str 32, 编码值
|
|
||||||
“v” “ str 255,编码显示文本
|
|
||||||
]
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user