Django's forms are security-smart the way you want them to be

In reply to my desire for read-only form fields , a commentator on Reddit wrote (in part):

You don't really save much code by having read only inputs. In theexample used (inputs only editable if blank) you would still needserver side checking that these values are not modified. [...]

This is incorrect (at least for a competent implementation of read onlyfields). As a modern framework, Django is smart about this so it nevertakes the network's


皇上無話兒,奧斯卡大獎九成有份兒。

The King’s Speech 在香港上畫了,戲名被翻譯為「皇上無話兒」,有朋友說譯得不倫不類,但我反而覺得總比直譯的「國王的演講」,或甚至是變了動作片的「王者之聲:宣戰時刻」來得更有心思。

向來喜歡看歷史人物傳記的電影,加

Continue reading...

最佳男女主角

Continue reading...

可以攜帶 / 可以放下的重量

可以攜帶 / 可以放下 的重量

Continue reading...

二零一一 二月盡頭

apm見到劉璇和光良唱歌,光良就算了,劉小姐看來還是搞玩體操唱歌仔會有噱頭些,歌喉真的不中聽。

現在有種東西叫「女奴」,當然不是指女人,是指那些有了另一半又出去玩的人,每當另一半打來,他們就會好詳細,好清楚

Continue reading...

初到貴境奧克蘭(三)—奧克蘭動物園

在奧克蘭市中心休息了一晚後,翌日早上和太太拿了租車,才正式出發,展開我們的新西蘭北島之旅。

看看附近有什麼觀光熱點,GPS上顯示出位於市中心西邊的奧克蘭動物園(Auckland Zoo),不多想,如是即出發去也。

奧克蘭動物園(

Continue reading...

形象趣問

假如禿頭的是沈旭暉,金毛的是陳雲,哪個會有更多 fan 屎?

假如佩琳(Sarah Palin)是個老太婆,會不會仍有那麼多保守派老頭支持?

假如長毛不長毛,我們會不會更不接受他放肆?

假如陶傑經常當眾挖鼻屎,他是否還是風流才子?


A belated realization about web spiders and your page cache

Like a lot of other web applications, DWiki has various sorts ofcaching . One of its caching mechanisms is a simplebrute force cache for full pages, intended to deal with Slashdoteffect situations ; if a page has taken 'toolong' to generate it's put into the cache, and then further requests forit are served straight from the cache for a short interval.

Just today, I realized that much of what was getting put into the pagecache was actually being inserted pointlessly.

Like most any blog


婦產勇者

婦產科應該是醫院裏最特別的一科。也許因為在生老病死的人生定律之中,它總是離開悲傷的死最遠,卻與喜悅的生最近。跟別的走廊截然不同,在婦產科之中,我們好像永遠都能找到快樂的笑容,滿足的表情,似乎就連醫生和

國王的自卑感

我每天收到的讀者來信數量驚人,要逐一認真地回信自然也需要驚人的時間。曾有讀者來信告訴我未婚懷孕,問我應不應把孩子生下來。當她收到我的回信,恐怕連仔都生埋。遠水不能救近火,這種緊急的情況,擲毫好過問我。