V
V
Vista2015-07-07 12:46:16
Django
Vista, 2015-07-07 12:46:16

How to connect Markdown to models?

Hello dear!!!
There was a problem with inserting an editor to the project,
in general there is a Firms class

class Firms(models.Model):
    name = models.CharField(max_length=255, verbose_name="Название фирмы")
    photo = models.ImageField(upload_to="doctors_photos", verbose_name="Фото")
    specs = models.CharField(max_length=1000, verbose_name="Специализация")
    regime = models.TextField(default="", verbose_name="Режим работы")
    .
    .
    .

and questions:
1) How to connect markdown to models (more precisely, to Firms)?
2) How to make markdown connect only to TextField ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2015-07-07
@sim3x

You override save() in the model or in the ModelForm through which you save
from text to html everything turns like this
But it's better to render in the template
stackoverflow.com/questions/16689334/troubleshooti...

D
denizen, 2015-07-07
@denizen

Have you tried this battery ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question