I
I
Ilya Atabekov2021-12-05 11:42:41
Python
Ilya Atabekov, 2021-12-05 11:42:41

I can't make an entry (paragraph) in the field (models.TextField) in the Django admin?

I can’t make an entry (paragraph) in the field (models.TextField) in the Django
admin
panel

class News(models.Model):
    name = models.CharField(max_length=60, verbose_name="Название", default='')
    img = models.ImageField(verbose_name="картинка", upload_to="media/imgs", null=True, default='')
    article = models.TextField(verbose_name="статья", default='')
    art = models.ForeignKey(to=Article, on_delete=models.CASCADE, verbose_name="новость", default='')
    news_type = models.CharField(max_length=20, verbose_name="тип новости", blank=True)

    def __str__(self):
        return self.name

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antonio Solo, 2021-12-05
@solotony

how do you display text? use filters in the template linebreaksor linebreaksbrto work out line
breaks about the wusiwug editor (pictures) - you need to install it additionally

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question