thanks everyone!!!

On Tue, Aug 4, 2020 at 8:10 AM Yemin Sajid <yeminsa...@gmail.com> wrote:

> I would suggest you to only put the *video id* in the charfield and use
> that to render the *<iframe> *in the template. Otherwise, there can be
> security issues if the content from the charfield is rendered safely as
> HTML.
>
> So in your template could it would be something like
> *<iframe width="640" height="360" src="https://www.youtube.com/embed/{{
> video_id }} <https://www.youtube.com/embed/Rj_vssRaZlQ>" frameborder="0"
> allow="accelerometer; autoplay; encrypted-media; gyroscope;
> picture-in-picture" allowfullscreen></iframe>*
>
> On Mon, Aug 3, 2020 at 11:16 PM neeraj garg <neeraj....@gmail.com> wrote:
>
>> Try to use django *safe *filter to render this as html.
>>
>> On Mon, Aug 3, 2020 at 8:35 PM Kovy Jacob <kovy.ja...@gmail.com> wrote:
>>
>>> Hi, is there a type of field for django data models that's for html? I
>>> want to have youtube embed links, which is a bunch of html fo putting a
>>> youtube video on your site. Itlooks like this: "<iframe width="640"
>>> height="360" src="https://www.youtube.com/embed/Rj_vssRaZlQ";
>>> frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope;
>>> picture-in-picture" allowfullscreen></iframe>". I stored it in a charfield,
>>> but it gets shown on the website as text.
>>> What should I do?
>>> Thanks,
>>> Kovy
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CACMwF3VTKYF3Zjm9fQMFwtjvxYXdsUA1JV6mXFTrD0XBW5bDdw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CACMwF3VTKYF3Zjm9fQMFwtjvxYXdsUA1JV6mXFTrD0XBW5bDdw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Thanks,
>> Neeraj
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAGR%2Bspcu_xgOgVLiStZEd2O0ePPCYnt_oYoSCm2D37FRYwGSqw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAGR%2Bspcu_xgOgVLiStZEd2O0ePPCYnt_oYoSCm2D37FRYwGSqw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFzgvyFVTg%2BAkPDbS6idkWERPx7ZpNg%3DXdU38qy1Z-4ua_ua9g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFzgvyFVTg%2BAkPDbS6idkWERPx7ZpNg%3DXdU38qy1Z-4ua_ua9g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACMwF3WsVhp0XeRJP6bn%2BSg5UW%2B9u%2BXEL9h5Q%2BHjJeF8jdYcfA%40mail.gmail.com.

Reply via email to