2

django を初めて使用するので、助けが必要です...

エラー:

Reverse for 'anuncio' with arguments '(u'Restaurante Avenida',)' and keyword arguments '{}' not found.

リクエスト方法: GET Django バージョン: 1.5.2 例外タイプ: NoReverseMatch 例外値:

引数 '(u'Restaurante Avenida',)' およびキーワード引数 '{}' を持つ 'anuncio' の逆が見つかりません。

例外の場所: レンダリング中の /usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py、424 行目 Python 実行可能ファイル: /usr/bin/python Python バージョン: 2.7.3

URL:

url(r'^anuncio/(?P<titulo>\d+)$', anuncio),

テンプレート:

<a href="{% url 'anuncio' user.userprofile.anuncio %}"> {{user.userprofile.anuncio}} </a>

見る:

def anuncio(request, titulo):

Anuncio = Anuncio.objects.get(titulo = titulo)

variables = RequestContext(request, {'anuncio': Anuncio})

return render_to_response('anuncio.html', variables)
4

1 に答える 1