Django: Reverse not found > {% url %} in template <p>This problem seems simple and it is described multiple times in SO, but I still can't figure out why it isn't working in my case.</p> <p>So, I have a url declared in <strong>urls.py</strong></p> <pre><code>urlpatterns = patterns('', url(r'^(?P&lt;country&gt;[-\w]+)/$', CountryListView.as_view(), name='list_by_country'),) </code></pre> <p>and in my <strong>template</strong> I'm calling the url</p> <pre><code>&lt;a href="{% url 'list_by_country' country.country__name %}" &gt;{{ country.country__name }}&lt;/a&gt; </code></pre> <p>However, I am getting the <strong>error message</strong> that the url could not be reversed</p> <pre><code>Reverse for 'list_by_country' with arguments '(u'United Kingdom',)' and keyword arguments '{}' not found </code></pre> <p>What is causing the reverse error? Are spaces in the argument maybe not allowed?</p> <hr>