#4587: [newforms-admin] attribute `model._meta.admin` is not assigned but it is
needed in many places.
----------------------------------------------+-----------------------------
   Reporter:  yi.codeplayer at gmail dot com  |                Owner:  adrian   
      
     Status:  new                             |            Component:  Admin 
interface
    Version:  newforms-admin                  |           Resolution:           
      
   Keywords:                                  |                Stage:  Accepted 
      
  Has_patch:  1                               |           Needs_docs:  0        
      
Needs_tests:  0                               |   Needs_better_patch:  1        
      
----------------------------------------------+-----------------------------
Changes (by jkocherhans):

  * needs_better_patch:  0 => 1
  * stage:  Ready for checkin => Accepted

Comment:

 This is not going to work if you have multiple {{{AdminSite}}} instances.
 The best way to fix this is to replace any calls to
 {{{model._meta.admin}}} with code that looks something up from the current
 {{{AdminSite}}}'s registry. "current" only has meaning in view code,
 however.
 
 The {{{adminindex}}} command in particular uses {{{model._meta.admin}}}
 and would really have no concept of what the "current" {{{AdminSite}}} is
 (unless you always assumed it uses the default one.) We could give each
 {{{AdminSite}}} object a unique name and let {{{adminindex}}} take that
 name as an optional argument (no argument means use the default one), or
 drop the {{{adminindex}}} command all together.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4587#comment:3>
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