How to get song path from FileField to a play button?

Hi!

I’m building a weird music player, each row is a song, it has one song for now:

So I created a FileField in my model.py to store .mp3 files:

song_file = models.FileField(parameters)

And I have 2 questions :

  1. I have to give scripts to the play/stop, back/next buttons: should i use javascript? or python?
  2. I have no idea where to start, can someone point me to the right direction?

Thanks a lot

The “player” components of this needs to be in JavaScript. Your Django / Python code runs on the server, not in the browser…

I’ve never tried to do anything like this, but if I had to solve this, I’d start by looking at either or both of the audio html element or the JavaScript Audio object.

Thanks!, I will try that