2012年3月29日 星期四

[Flask][WTForms] 要在HTML的Select tag, 新增一個"空"的預設選項

本來想用jQuery來後製,但其實不用那麽麻煩,WTForms果然都想好了:
QuerySelectField的話,加上
allow_blank=True, blank_text=u'-- please choose --'


wtforms doc

2012年3月8日 星期四

時常出現HTTP 403 Forbidden

Forbidden

You don't have permission to access xxx on this server.

通常發生在圖很多的頁面,兇手是Apache防DOS的mod_evasive
果然是被保護機制擋掉了...