#13743: CommentsAdmin blows up when 'delete_selected' action is disabled.
----------------------------------------------+-----------------------------
          Reporter:  daniellindsley           |         Owner:  nobody
            Status:  new                      |     Milestone:        
         Component:  django.contrib.comments  |       Version:  1.2   
        Resolution:                           |      Keywords:        
             Stage:  Accepted                 |     Has_patch:  1     
        Needs_docs:  0                        |   Needs_tests:  1     
Needs_better_patch:  0                        |  
----------------------------------------------+-----------------------------
Comment (by d0ugal):

 I've been working on this and I can confirm the patch and test apply
 cleanly - they also solve the issue and I've tested it in an example
 project. I've not managed to figure out a automated test yet that works
 correctly - any suggestions would be welcome.

 Currently I've tried the following in AdminActionsTests
 (regressiontests/comment_tests/tests/moderation_view_tests.py)

 {{{
     def testDisableDeleteSelected(self):
         comments = self.createSomeComments()
         makeModerator("normaluser")

         self.client.login(username="normaluser", password="normaluser")

         from django.contrib import admin
         admin.site.disable_action('delete_selected')

         response = self.client.get("/admin/comments/comment/")
         self.assertEqual(response.status_code, 200)
 }}}

 I'm not that familiar with the disable_action but it doesn't seem to be
 having any effect when placed like this.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13743#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to