我的HTML代码
<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代码
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})
让我知道我是否遗漏了某些东西
答案 0 :(得分:0)
将msg = request.POST.get('d')
替换为msg = d