References :
Reusing Flask-WTF forms. » BTHLabs
The Flask Mega-Tutorial, Part III: Web Forms - miguelgrinberg.com
2015年6月19日 星期五
WTForms dynamic set default SelectField value
myform = TestForm()
myform.select.default = 2
myform.process() // <-- :="" br="" missed="" this="" you="">
myform.title.data = 'xxxx'
....-->
References :
Change default value of a SelectField after form creation · Issue #106 · wtforms/wtforms
WTForms Dynamic Select Field 'Not a Valid Choice' error
area = SelectField(coerce=int)
References :
python - Not a Valid Choice for Dynamic Select Field WTFORMS - Stack Overflow
WTForms get label text
{{ form.my_field.label.text }}
References :
accessing label property without html generation.. - Google Groups
References :
accessing label property without html generation.. - Google Groups
2015年5月28日 星期四
CI Bonfire read global config variable
Example:
Config file :
Controller :
Config file :
application/config/address.php
Controller :
$this->load->config('address');
$address = config_item('address.countries');
2015年5月15日 星期五
TypeError: 'unicode' does not have the buffer interface
from 0.9.4 to 0.9.6
References :
TypeError: 'unicode' does not have the buffer interface · Issue #17 · miguelgrinberg/flasky
# pip install --upgrade Werkzeug
References :
TypeError: 'unicode' does not have the buffer interface · Issue #17 · miguelgrinberg/flasky
訂閱:
文章 (Atom)