J
J
JoshGeorge2021-12-14 11:14:42
Django
JoshGeorge, 2021-12-14 11:14:42

What types of model fields should be used in this situation?

Hello, for images in django there is an imagefield model field type, for plain text there is a textfield.
content = .TextField()
photo = .ImageField()
Question: what types of model fields can be used for:
1) inserting video (iframe) from video hostings (for example, YouTube)?
2) text with html elements (like a textfield, only to accept html elements)?
iframevideo = .?Field()
contentwithhtml = .?Field()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-12-14
@JoshGeorge

And that html markup, including the iframe tag, has become some kind of separate data type other than text? Both are just a TextField.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question