A
A
Artur Kudashev2019-01-13 20:29:57
Django
Artur Kudashev, 2019-01-13 20:29:57

How to add a text editor?

Good day. Is it possible to add simpleMDE to the Django admin? If so, how? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Web Dentist, 2019-01-13
@archi_kud

pip install django-simplemde
#settings.py

INSTALLED_APPS = (
    # ...
    'simplemde',
    # ...
)

#models.py
from django.db import models
from simplemde.fields import SimpleMDEField

class Entry(models.Model):
    title = models.CharField(max_length=250, verbose_name=u'Title')
    content = SimpleMDEField(verbose_name=u'mardown content')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question