V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
lbfeng
V2EX  ›  Python

wtforms SelectField 如果有上百 choices 该怎么处理

  •  
  •   lbfeng · Nov 11, 2015 · 3179 views
    This topic created in 3829 days ago, the information mentioned may be changed or developed.

    choices 在一个 json 文件里,通过 ajax 插入到 select 中。
    后端 choices=[]的话无法通过验证。该怎么处理呢?

    1 replies    2015-11-11 13:57:30 +08:00
    tangshiping
        1
    tangshiping  
       Nov 11, 2015
    select 的选择事件时把选中的部分设置到一个 hidden 控件里回传?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3168 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 14:36 · PVG 22:36 · LAX 07:36 · JFK 10:36
    ♥ Do have faith in what you're doing.