DJANGO NoReverseMatch at /"reverse not found"
first time with django, need some help...
Error:
Reverse for 'anuncio' with arguments '(u'Restaurante Avenida',)' and
keyword arguments '{}' not found.
Request Method: GET Django Version: 1.5.2 Exception Type: NoReverseMatch
Exception Value:
Reverse for 'anuncio' with arguments '(u'Restaurante Avenida',)' and
keyword arguments '{}' not found.
Exception Location:
/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py in
render, line 424 Python Executable: /usr/bin/python Python Version: 2.7.3
url:
url(r'^anuncio/(?P<titulo>\d+)$', anuncio),
template:
<a href="{% url 'anuncio' user.userprofile.anuncio %}">
{{user.userprofile.anuncio}} </a>
view:
def anuncio(request, titulo):
Anuncio = Anuncio.objects.get(titulo = titulo)
variables = RequestContext(request, {'anuncio': Anuncio})
return render_to_response('anuncio.html', variables)
No comments:
Post a Comment