我有以下基于类的视图。
class AllPluginsView(ListView):
queryset = get_models(get_app('plugins'))
template_name="console/plugins/plugins.html"
context_object_name = "objects"
并遵循模板,
{% for object in objects %}
<tr>
{% if object %}
<td>{{ object }}</td>
{% endif %}
</tr>
{% endfor %}
当我要求页面时,我得到DoesNotExist at /path/to/plugins
No exception supplied.
错误。有任何想法吗 ?
urlpatterns = patterns('',
url(r'^$', AllPluginsView.as_view(),name='all-plugins'),
)