Last Updated: February 25, 2016
·
1.339K
· timonweb

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

Use <a href="http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields">Readonly Fields</a>:

Example:

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