How to put html links / tags in models.TextField

0

Oops, people, everything with you?

I have a description field and it is a TextField, how do I format a link in it? (leave it cute) I tried to put html tags but it does not.

models.py:

description = models.TextField()

In Django admin:

Intherenderedtemplate:

I wanted the link to appear cute but it does not recognize the

    
asked by anonymous 14.10.2017 / 01:04

1 answer

0

You need to tell django that this HTML is "reliable" for this you can do:

{{your_model.description | safe}} That django will render.

    
19.10.2017 / 15:57