Re: field for html

2020-08-05 Thread Kovy Jacob
thanks everyone!!! On Tue, Aug 4, 2020 at 8:10 AM Yemin Sajid wrote: > I would suggest you to only put the *video id* in the charfield and use > that to render the * *in the template. Otherwise, there can be > security issues if the content from the charfield is rendered safely as > HTML. > > So

Re: field for html

2020-08-04 Thread Yemin Sajid
I would suggest you to only put the *video id* in the charfield and use that to render the * *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 *https://www.youtube.com/embed/{

Re: field for html

2020-08-03 Thread neeraj garg
Try to use django *safe *filter to render this as html. On Mon, Aug 3, 2020 at 8:35 PM Kovy Jacob 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 t

field for html

2020-08-03 Thread Kovy Jacob
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: "https://www.youtube.com/embed/Rj_vssRaZlQ"; frameborder="0" allow="accelerometer; autoplay; encrypted-media;

Re: Model: field for HTML

2008-01-25 Thread Michael Hipp
Rajesh Dhawan wrote: > > > On Jan 25, 11:57 am, Michael Hipp <[EMAIL PROTECTED]> wrote: >> When creating a field that will hold HTML snippets, should it be created >> as a CharField or an XMLField (or something else)? > > Either of those would work. The XMLField would require you to > guarantee

Re: Model: field for HTML

2008-01-25 Thread Rajesh Dhawan
On Jan 25, 11:57 am, Michael Hipp <[EMAIL PROTECTED]> wrote: > When creating a field that will hold HTML snippets, should it be created > as a CharField or an XMLField (or something else)? Either of those would work. The XMLField would require you to guarantee that the HTML snippet is valid XML

Model: field for HTML

2008-01-25 Thread Michael Hipp
When creating a field that will hold HTML snippets, should it be created as a CharField or an XMLField (or something else)? Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p