コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7149 ビュー

Hi guys !

I want to add a field who has all the time the same value (for every objects of his class).

How can i do that ?

Thanks.

アバター
破棄
最善の回答

You can create a field in python like that :

_columns = {
    'my_field' : fields.char('My static field', size=64),
}
_defaults = {
    'my_field': lambda *a: 'The default value',
}
アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 24
27836
0
3月 15
5802
1
3月 15
10762
3
3月 15
8716
1
3月 15
10222