Django Inline Formsets using custom form

前端 未结 2 1201
春和景丽
春和景丽 2021-02-19 05:28

I am using inline formsets.

My model:

class Author(models.Model):
    description = models.CharField(max_length=100)

class Book(models.Model):
    autho         


        
2条回答
  •  情话喂你
    2021-02-19 06:08

    I dont know if i have understand your question: do you want Book.details rendered as a textarea?

    If so, just use a TextField instead a CharField.

    class Author(models.Model):
       description = models.TextField()
    

提交回复
热议问题