1

I have a model (Candidate) with a property (key) which return a big string.

I register this model in admin.py and add the field with:

class CandidateAdmin(admin.ModelAdmin):
    readonly_fields = ['key']

But the field is displayed as a CharField. How to show it in a TextField widget ?

Benjamin
  • 3,350
  • 4
  • 24
  • 49

0 Answers0