Why does this return a NoReverseMatch?
From django-postman:
url(r'^write/(?:(?P<recipients>[\w.@+-:]+)/)?$', 'write', name='postman_write'),
Template:
<a href='{% url postman_write recipients=object.user %}'>Send Message</a>
This does not work either..
<a href='{% url postman_write object.user %}'>Send Message</a>
Returns: Reverse for 'postman_write' with arguments '(<User: admin>,)' and keyword arguments '{}' not found. What am I missing to construct this url properly? Thanks!
you are passing a user object in
urltag. You need to pass the username.Also make sure you have included the postman urls in your main
urls.pyfile.