我正在关注我的 urlpatterns 的教程:
urlpatterns = patterns('',
url(r'^passwords/$', PasswordListView.as_view(), name='passwords_api_root'),
url(r'^passwords/(?P<id>[0-9]+)$', PasswordInstanceView.as_view(), name='passwords_api_instance'),
...other urls here...,
)
PasswordListView和PasswordInstanceView应该是基于类的视图。我无法弄清楚名称参数的含义。它是传递给视图的默认参数吗?