Replace {% url urlname %} with {% url "urlname" %}