so i want play music from local storage, but the music cannot be played. at terminal it says not found the folder. but when i open again the website, the music can be played. but when i uploaded new music, the music cannot be played again. at my terminal like this::
html
<audio controls="controls">
<source src="/media/mp3/{{last_audio.audio}}" type="audio/mpeg">
</audio>
views
def homepage(request):
form = AudioForm()
last_audio = Audio_store.objects.last()
if request.method == "POST":
form = AudioForm(request.POST, request.FILES)
if form.is_valid():
form.save()
audio = form.cleaned_data.get("audio")
print(audio)
context={'form':form, 'last_audio':audio}
return render(request, 'homepage.html', context)
context={'form':form, 'last_audio':last_audio}
return render(request, "homepage.html", context=context)