1

I have Article model and a Comment model. Comment is created in admin.py as admin.StackedInline, and it has several fields, notably content and lastUpdate. For lastUpdate, i have specified as follows: lastUpdate = models.DateTimeField('last update', auto_now=True). Understandably, lastUpdate is not displayed when i try to add new comment (or edit old ones). However, i would like it to display for older comments if possible, as a read only thing. Is there anyway of accomplishing that?

Thanks a lot!

Jason

FurtiveFelon
  • 14,714
  • 27
  • 76
  • 97

1 Answers1

0

I guess if this http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields doesn't do what you want it to do, have a look at this: In a Django form, how do I make a field readonly (or disabled) so that it cannot be edited?

Community
  • 1
  • 1
Bernhard Vallant
  • 49,468
  • 20
  • 120
  • 148