So I have passed in strings with Django to my HTML template.
def media(request, media_id):
specificMedia = get_object_or_404(Stream, pk=media_id)
channel = str(specificMedia.channel)
urldata = "http://www.twitch.tv/widgets/live_embed_player.swf?channel=" + str(channel)
urlvalue = "hostname=www.twitch.tv&channel=" + str(channel) + "&auto_play=true&start_volume=25"
return render(request, 'livestream/media.html', {'specificMedia': specificMedia, 'channel': channel, 'urldata': str(urldata), 'urlvalue': str(urlvalue)})
now I want to use these in my html
<p>URLDATA: {{urldata}}</p>
<p>URLVALUE: {{urlvalue}}</p>
<object type="application/x-shockwave-flash"
height="378"
width="620"
id="live_embed_player_flash"
data= {{urlvalue}}
bgcolor="#000000">
<param name="allowFullScreen"
value="true" />
<param name="allowScriptAccess"
value="always" />
<param name="allowNetworking"
value="all" />
<param name="movie"
value="http://www.twitch.tv/widgets/live_embed_player.swf" />
<param name="flashvars"
value= {{urlvalue}}
</object>
So the first ones worked perfectly and printed out my URLs, but the ones in the object seem to not be working. I'm not sure how to test them, but the livestreams that I am trying to display are not showing up. They are supposed to be in the form of a string on the html code. How do I make the variables strings in HTML?
Thanks