D
D
Deleting Account2019-08-17 18:03:46
Django
Deleting Account, 2019-08-17 18:03:46

Django 2. How to make such a model?

I want to make a model that is similar in structure to the "Question Details" model in Toaster. That is, so that it would be possible, at any place in the description, to insert a picture, link, list, etc. How can this task be implemented? I didn’t find anything on the Internet, if there is another resource that explains this, then please share, I will be grateful.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew, 2019-08-17
@Andriy_Kosmenyuk

That is, so that it would be possible, at any place in the description, to insert a picture, link, list, etc. How can this task be implemented?

Ordinary TextField or CharField.
You can use CKEditor - it's quite flexible in settings
https://django-ckeditor.readthedocs.io/en/latest/
Or look in the source how it's done and write for yourself with the desired functionality.

A
alfss, 2019-08-17
@alfss

Make a text field and put the markdown parser there, for example, and then it's up to your imagination
https://django-suit.readthedocs.io/en/develop/wysi... or so for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question