错误信息:
ExceptionType: NoReverseMatch
Exception Value: Reverse for 'darts.teams.views.expanded_details' with arguments '(u'RightFlights',)' and keyword arguments '{}' not found.
在模板中:
<a href="{{ lib.url(expanded_details, team.name) }}" class="btn btn-cog">Expanded Details</a>
在 urls.py
urlpatterns = patterns('darts.teams.views',
url(r'^(?P<teamname>.*?)/expanded_details/$', 'team_details', {'expanded': True}, "expanded_details"),
url(r'^(?P<teamname>.*?)/details/$', 'team_details', name="team_details"),
url(r'^(?P<teamname>.*?)/add_player/$', 'team_add_player', name="team_add_player"),
url(r'^(?P<teamname>.*?)/add_player/confirm/$', 'team_add_player',"team_add_player_confirm"),
)
urls.py 中的其他 URL 都可以正常呈现,但“expanded_details”会引发错误。
为什么这个和其他的不一样?我错过了什么公然的东西吗?