I am trying to figure this one out and for some reason every attempt failed so far. I have two simple models: Question and Answer:
class Question(models.Model):
phoneID = models.CharField(max_length=255, editable=False)
name = models.CharField(max_length=255, editable=False)
phone = models.CharField(max_length=255, editable=False)
message = models.TextField(editable=False)
answered = models.DateTimeField(editable=False)
created = models.DateTimeField(auto_now_add=True, default=datetime.utcnow())
class Answer(models.Model):
question = models.ForeignKey(Question)
message = models.TextField()
created = models.DateTimeField(auto_now_add=True, default=datetime.utcnow())
For some reason I am unable to figure out what I am supposed to put into my admin.py to have previously added answers listed inline as readonly and at the same time allow inline new answers to be added. Everytime I set readonly_fields=('message') I am not able to add a new answer because the message textarea is readonly.