18👍
✅
You need to add readonly_fields
to your OrderAdmin
, and add created
to that list, such as:
@admin.register(Order)
class OrderAdmin(admin.ModelAdmin):
...
readonly_fields = ['created']
The Django docs describe that when using fieldsets
which contain read-only fields, those fields must be listed in readonly_fields
for them to be displayed.
Source:stackexchange.com