0
我寫了一個表單字段這樣Django的:定義自己的表單字段
//forms.py
hostAdress = forms.CharField(required = False,
label = ('#content'),
initial = ('#content'))
adminHostAdress = hostAdress
userHostAdress = hostAdress
這是正確顯示,但是當要保存的形式,我來了用填充的字段形成後面,沒有其他事情發生。
當我寫
adminHostAdress = forms.CharField(required = False,
label = ('#content'),
initial = ('#content'))
userHostAdress = forms.CharField(required = False,
label = ('#content'),
initial = ('#content'))
所有的作品,但我重複自己,我有更多的這些領域,我想一次寫入。
有什麼想法?
OK,那討厭的;)有沒有辦法讓表單字段中的兩個獨立的情況下,容易嗎? – Bubbleboy 2013-03-14 13:52:33