my HTML code
<html>
{% for d in name %}
<li><a id = {{d}} alt={{d|slugify }} href ="/hindi_guitarchords/{{d}}"
class = "click">{{d}}</a> </li>
{% endfor %}
</html>
url.py code
url(r'^hindi_guitarchords/(?P<d>.*)/$', 'guitarchordsapp.views.hindi_guitarchords'),
views.py
def hindi_guitarchords(request, d):
msg = request.POST.get('d')
#msg= get_object_or_404(Post,slug=d)
return render_to_response('hindi_guitarchords.html',{'song_name':msg})
Let me know if I'm missing something
代替msg = request.POST.get('d')
与msg = d
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.