Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#8947 closed Uncategorized (duplicate)

A way to have non-editable fields in the admin

Reported by: simon Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Normal Keywords: DjangoCon
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Adrian and Jacob on stage at DjangoCon.

Change History (3)

comment:1 by Julien Phalip, 16 years ago

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.

comment:2 by dc, 16 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #342

comment:3 by anonymous, 12 years ago

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset
Note: See TracTickets for help on using tickets.
Back to Top