#15424: readonly_fields in InlineModelAdmin looks up wrong callable
------------------------------------------------+---------------------------
               Reporter:  kmike                 |         Owner:  nobody
                 Status:  new                   |     Milestone:        
              Component:  django.contrib.admin  |       Version:  SVN   
             Resolution:                        |      Keywords:        
           Triage Stage:  Accepted              |     Has patch:  0     
    Needs documentation:  0                     |   Needs tests:  0     
Patch needs improvement:  0                     |  
------------------------------------------------+---------------------------

Comment (by ramiro):

 Karen's patch not only fixes the problem but also fixes the inconsistency
 I was seeing: I could reproduce the issue in a real application but not
 under the test environment when trying to prepare tests initial
 conditions.

 Only thing I'd add is early detection (during admin validation) of a
 missing callable specified in an admin inline `'readonly_fields'`.
 Currently the check is done only for !ModelAdmin's, this check effectively
 overlaps a bit with the fixed `model_admin.__class__.__name__` check in
 `django/contrib/admin/util.py`.

 Commit will include this  extra modification.

 Also, the fact that such kind of errors weren't being caught early might
 be related to the problem I describe above because including a missing
 callable in a inline `'readonly_fields'` in a test app, with DEBUG=False
 shows a broken add view when requested from a browser: No CSS styling,
 missing inlines block, multiple missing 500.html errors on the console,
 but HTTP status is 200.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15424#comment:8>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to