I have the following django model:
class Article(models.Model):
title = models.CharField(max_length = 200)
body = models.TextField()
created_date = models.DateTimeField(auto_now_add=True)
I also have the following django admin class:
class ArticleAdmin(admin.ModelAdmin):
fields = ['title', 'body']
readonly_fields = ['created_date']
list_display = ['title', 'body', 'created_date']
In the django admin app I can see the created_date field in my Article list:

But for the life of me I can’t get the created_date field to render (as a read only field) when I open an Article:

I got the impression from the docs and from googling around that adding Article’s created_date field to readonly_fields would allow this to happen even if I had set auto_now_add to True on a DateTimeField.
Am I barking up the wrong tree here?
I’m using django 1.4.2.
If you’ve specified
fields, you need to add the field tofields.The
auto_nowmagic has gotten me a few times.