#8947: A way to have non-editable fields in the admin
------------------------------------+---------------------------------------
          Reporter:  simon          |         Owner:  nobody   
            Status:  new            |     Milestone:           
         Component:  Uncategorized  |       Version:  1.0      
        Resolution:                 |      Keywords:  DjangoCon
             Stage:  Unreviewed     |     Has_patch:  0        
        Needs_docs:  0              |   Needs_tests:  0        
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by julien):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I remember we've discussed that on the dev-list a while ago:
 http://groups.google.com/group/django-
 developers/browse_thread/thread/611425acc40b78bb

 I think something in the lines of:

 {{{
 class MyModelAdmin (admin.ModelAdmin)
     fields = ['name', 'bio', 'url', 'date_signup']
     readonly = ['date_signup']
 }}}

 I can see 2 cases where you'd want to display the field but not edit it:

 - fields that have editable=False and that are present in the
 fields/fieldsets admin options. Those would automatically be rendered
 read-only.
 - fields that are intrinsically editable, but that you want to be editable
 only by some administrators and not by others.

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