python - Passing arguments in {% url %} in Django -
i've template:
<ul> {% url1 in urls %} <li><a href="{% url 'disp' url1.url_name %}">{{ url1.url_title }}</a></li> {% endfor %} </ul>
i'm trying pass url (i.e. url1.url_name) view ('disp') it's not taking it.
it's giving following error:
reverse 'disp' arguments '(u'file:///e:/beproject/websites_collection/katewinslet.html',)' , keyword arguments '{}' not found. 1 pattern(s) tried: ['display/(?p<webpage>[^/]+)/$']
where 'file:///e:/beproject/websites_collection/katewinslet.html' instance of url1.
i've no idea doing wrong. problem seems present in regex part of code (i think) don't know how solve it. please help.
as error says, 'url1.url_name' contains nothing (i.e. keyword arguments '{}'). check , see why it's empty.
Comments
Post a Comment