I’m trying to redirect to a swf file because I need to embedd that in a fb:swf which wants its absolute path. When I handle the swf in url’s somehow it doesn’t work.
In url.py
(r'^flash/','lastproject.yofacebook.flashtest.flash'),
In flahstest.flash
def flash(request):
return render_to_response('as3.swf')
I want to open the swf on this url
http://testapp.varheroes.com/flash/
the fb:swf
<fb:swf
swfbgcolor="ffffff"
swfsrc='http://testapp.varheroes.com/flash/'
width='620' height='530' />
The error I get
'utf8' codec can't decode bytes in position 5-6: invalid data
render_to_responseis used to render a template and send it as a response. I don’t think your swf file is a template, so you should just return it directly:But really you shouldn’t be sending that file through Django at all, it should be served by whatever is serving the rest of your static files (CSS, JS etc).