DjangoDjango

Django admin: How to display a field that is marked as editable=False in the model?

Sep 28, 2013 · Updated: Nov 10, 2017 · by Tim Kamanin

Use Readonly
Fields
,
example:

python
class MyModelAdmin(admin.ModelAdmin):
  readonly_fields=('first',)

Hey, if you've found this useful, please share the post to help other folks find it:

There's even more:

Subscribe for updates

  • via Twitter: @timonweb
  • old school RSS:
  • or evergreen email ↓ ↓ ↓