4b11b4 / potify

[S]potify generic music player learning project
0 stars 1 forks source link

Play counter increment #3

Open 4b11b4 opened 5 years ago

4b11b4 commented 5 years ago

line 6 -- pot/pot/templates/music/song_detail.html

For the

now... how to access the model objects from javascript?

zachcalvert commented 5 years ago

This raises a question for me: Do we want to increment the counter only when the audio play ends? I think you could make the argument that it should get incremented the moment someone presses 'Play'. I could be convinced either way, but I think I lean towards incrementing the counter the moment it's played.

Either way, we will need a way to write this back to the db from the browser. This will require AJAX for now, until we move to Vue or React :)