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

Hello, I need a simple Form View with a button which calls a function in models.py: for example I need a View like in "Update Modules List" (in Settings).

I already created a model without fields and used it in form view so I could access to the functions inside it, but I still have the buttons like "Save" at top of the view which makes me create empty records in a table (only timestamps) if pressed.

Is there a way to remove "Save" button or there's a better solution for my problem?

Any help is appreciated.


アバター
破棄
最善の回答

Hi,

Use wizard with Transient Model (to avoid save and create button)

For Eg:

class class_name(models.TransientModel):  

Or:

you can restrict create, delete and write access for that model after creating one record (give only read access)..

==> use the most convenient method for you according to your need....


Hope this helps........ 


アバター
破棄
関連投稿 返信 ビュー 活動
1
3月 15
4919
0
3月 15
3266
3
5月 23
17152
1
8月 22
7773
3
12月 23
19937