DjangoBB

Django based forum engine

  • You are not logged in.
  • Root
  • » Bugs
  • » disable "delete_selected" admin action only for DjangoBB models [RSS Feed]

#1 July 31, 2012 16:25:54

jedie
From: germany
Registered: 2012-07-12
Posts: 160
Reputation: +  1  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

I notice that admin.site.disable_action('delete_selected') would disable the action for all models.

I changed the admin.py file to disable the action only for DjangoBB models: https://github.com/slav0nic/DjangoBB/pull/8

btw. why is this really needed? The comment says:

# disabled, because delete_selected ignoring delete model method

So model_instance.delete() would not be called? maybe http://stackoverflow.com/questions/1471909/django-model-delete-not-triggered would help?




Some of my Projects:
* Migrate phpBB to DjangoBB with django-phpBB3
* DjangoBB github repro and information about my changes
* PyLucid CMS written in Django: http://www.pylucid.org/

Offline

#2 Aug. 1, 2012 10:31:21

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 382
Reputation: +  5  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

it will be veeeeeryyy sloooow
deleting 100 objects ~= 100 delete operation + 100 select + 100 update + overhead from python

maybe on_delete action can help with action (but not with perfomance)

i don't played with new on_delete FK params in django 1.4 + for this django 1.3 support must be dropped

Offline

#3 Aug. 2, 2012 12:07:21

jedie
From: germany
Registered: 2012-07-12
Posts: 160
Reputation: +  1  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

The boring thing is, that you can't select a few post in the admin and delete it via actions.

In which scenario do you delete hundreds of post in a bulk?




Some of my Projects:
* Migrate phpBB to DjangoBB with django-phpBB3
* DjangoBB github repro and information about my changes
* PyLucid CMS written in Django: http://www.pylucid.org/

Offline

#4 Aug. 2, 2012 13:25:41

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 382
Reputation: +  5  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

jedie
./manage.py shell

ok, i will check is on_drop called via action

Offline

#5 Sept. 27, 2018 04:04:48

XRumerTest
Registered: 2018-09-22
Posts: 131
Reputation: +  0  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

Hello. And Bye.

Offline

#6 Sept. 27, 2018 05:14:51

XRumerTest
Registered: 2018-09-22
Posts: 131
Reputation: +  0  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

Hello. And Bye.

Offline

#7 Oct. 4, 2018 09:12:37

XRumerTest
Registered: 2018-09-22
Posts: 131
Reputation: +  0  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

Hello. And Bye.

Offline

#8 Oct. 8, 2018 00:32:29

XRumerTest
Registered: 2018-09-22
Posts: 131
Reputation: +  0  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

Hello. And Bye.

Offline

#9 Oct. 8, 2018 00:38:24

XRumerTest
Registered: 2018-09-22
Posts: 131
Reputation: +  0  -
Profile   Send e-mail  

disable "delete_selected" admin action only for DjangoBB models

Hello. And Bye.

Offline

  • Root
  • » Bugs
  • » disable "delete_selected" admin action only for DjangoBB models[RSS Feed]

Board footer

Moderator control

Powered by DjangoBB

Lo-Fi Version