Not able to parse the remainder in django template -


<html> <head>     <title>{{ songname }}</title>     <meta charset="utf-8">     {% load static %} </head> <body>     <center><h1>muosic</h1></center>     <hr>     <audio controls>     <source src="{% static {{ songname }} %}" type="audio/mpeg">     </audio>     <hr> </body> 

here songname name of song want play.all static files in static directory.from view function above template called using render_to_response function.so please can explain reason problem.

you can't nest template variables that. assuming songname actual name of file , file in root of static_root, do:

{% static songname %} 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -