something like: f = open("file.mp3", "rb") data = f.read() f.close() return HttpResponse(data, mimetype='audio/mp3')
On Apr 18, 6:34 am, The Danny Bos <danny...@gmail.com> wrote: > Heya, > > I'm trying to modify the content-type of a page to play an MP3. > > Basically, instead of pointing directly to an MP3, I'm pointing to a > view in Django to add some stats to the database etc, after all that > baloney is done, I want to go ahead and stream the track. > > Is there a way to do this, I figured it would be easy but I've been > stuck on it all day. > > Thanks so much, > > D > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.