Skip to content

Commit ae13e40

Browse files
committed
clean codes for wtforms.
1 parent 9c5418f commit ae13e40

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

README_zh.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@ API文档的建立
248248
`tornado_wtforms` 是一个基于 `tornado` 和 `wtforms` 的表单验证库,
249249
它提供了 `tornado` 的 `RequestHandler` 的 `form` 属性,用于处理表单验证。
250250

251-
`tornado_wtforms` 是从 `wtforms_tornado` 项目fork而来,它修复了 `wtforms_tornado` 的一些bug,同时添加了一些新的功能。
251+
`tornado_wtforms` 是从 `wtforms_tornado` 项目fork而来,它修复了 `wtforms_tornado` 的一些bug,
252+
同时添加了一些新的功能。
252253
但是在 pypi 上的 `tornado_wtforms` 项目自2022年发布后,就再也没有更新过。
253254

254255
在项目使用中,直接将 `tornado_wtforms` 项目中的 `tornado_wtforms` 文件夹(模块)复制到项目中,
255-
然后使用 `from tornado_wtforms.form import Form` 即可。
256+
然后使用 `from torcms.tornado_wtforms.form import Form` 即可。

config.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
"checker": "0",
5050
"show": "Page",
5151
},
52-
# "3": {
53-
# "router": "info",
54-
# "html": """<span style="color:blue;" class="glyphicon glyphicon-list-alt">[{0}]</span>""".format(
55-
# "Info"
56-
# ),
57-
# "checker": "0", # '10', '100', '1000', '10000'
58-
# "show": "Info",
59-
# },
52+
"3": {
53+
"router": "info",
54+
"html": """<span style="color:blue;" class="glyphicon glyphicon-list-alt">[{0}]</span>""".format(
55+
"Info"
56+
),
57+
"checker": "0", # '10', '100', '1000', '10000'
58+
"show": "Info",
59+
},
6060
"k": {
6161
"router": "tutorial",
6262
"html": """<span style="color:blue;" class="glyphicon glyphicon-list-alt">[{0}]</span>""".format(

torcms/handlers/user_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from torcms.model.user_model import MUser
2727

2828
# from wtforms_tornado import Form
29-
from tornado_wtforms.form import Form
29+
from torcms.tornado_wtforms.form import Form
3030

3131
# ToDo: 需要进行切换、测试
3232
# from tornado_wtforms.form import TornadoForm as Form
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)