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

Hello,
When I'm deleting model instance I want to check some conditions and if that conditions are true then allow deleting and if conditions are false don't allow user to delete entry.
So what  I thought, __del__() method is destructor and first I was thinking to use this function but after some testings it doesn't work as I want, so I must find another way. I want to find a way to test conditions before deletion happens and decide allow or not.
If question is still unclear tell me.

アバター
破棄
著作者 最善の回答

I've found a solution: I must override unlink method

アバター
破棄
関連投稿 返信 ビュー 活動
1
8月 24
1749
1
11月 23
4253
3
11月 24
10552
2
12月 22
14896
1
11月 21
5028