#7510: Patch to have change_view and delete_view methods of ModelAdmin use
queryset the queryset method
---------------------------------------------+------------------------------
          Reporter:  tom                     |         Owner:  nobody  
            Status:  new                     |     Milestone:  post-1.0
         Component:  Admin interface         |       Version:  SVN     
        Resolution:                          |      Keywords:          
             Stage:  Design decision needed  |     Has_patch:  1       
        Needs_docs:  0                       |   Needs_tests:  0       
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by jjackson):

 Here's another patch to handle this problem. I used this to fix the
 problem in ''Practical Django Projects.''

 After the patch has been applied, you can then use in your model an order
 such as

 {{{
 class Entry(models.Model):
     live = LiveEntryManager()
     objects = models.Manager()

 }}}

 and then in your admin.py use

 {{{
 class EntryAdmin(admin.ModelAdmin):
     prepopulated_fields = {'slug': ('title',)}
     model_admin_manager = Entry.objects

 }}}

 to set the manager to be used by the admin application for the Entry
 class. In this case, we wanted to see only the live entries on the
 website, but to see all the entries in admin app. Otherwise, after setting
 a Entry to "draft", you would never be able to edit it again.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7510#comment:5>
Django Code <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