简体   繁体   English

不存在。 没有提供异常的错误

[英]Does not exist. No exception supplied error

I have the following class based view. 我有以下基于类的视图。

class AllPluginsView(ListView):
    queryset = get_models(get_app('plugins'))
    template_name="console/plugins/plugins.html"
    context_object_name = "objects"

And following template, 接下来的模板

{% for object in objects %}
    <tr>
    {% if object %}
        <td>{{ object }}</td>
    {% endif %}
    </tr>
{% endfor %}

When I ask for the page, i get DoesNotExist at /path/to/plugins No exception supplied. 当我请求该页面时,我DoesNotExist at /path/to/plugins No exception supplied.获取了DoesNotExist at /path/to/plugins No exception supplied. error. 错误。 Any ideas ? 有任何想法吗 ?

urlpatterns = patterns('',
    url(r'^$', AllPluginsView.as_view(),name='all-plugins'),
)

Perhaps it's an import order thing? 也许是进口订单? Try using get_queryset instead. 尝试改用get_queryset

class AllPluginsView(ListView):
    template_name="console/plugins/plugins.html"
    context_object_name = "objects"

    def get_queryset(self):
        return get_models(get_app('plugins'))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 匹配查询不存在。 Django 错误 - matching query does not exist. Django Error “……匹配查询不存在。”错误,但对象显然存在 - “… matching query does not exist.” error, but object clearly does exist 错误apache spark MultilayerPerceptronClassifier-&#39;字段“功能”不存在。 - Error apache spark MultilayerPerceptronClassifier - 'Field “features” does not exist.' py到exe错误。 (FileNotFoundError:路径不存在。) - py to exe error. (FileNotFoundError: The path does not exist.) CustomUser 匹配查询不存在。 错误(DJANGO) - CustomUser matching query does not exist. ERROR( DJANGO) 什么错误“没有提供异常”是什么意思? - what does the error “no exception supplied” mean? 匹配查询不存在。 在 django - matching query does not exist. in django Django Ajax请求-500个内部服务器错误,带有“不存在匹配的查询。”错误 - Django Ajax requests - 500 INTERNAL SERVER ERROR with “matching query does not exist.” error macport :“错误:‘list’命令失败:指定的组‘python’不存在。” 在 MAC 上 - macport : "Error: The 'list' command failed: The specified group 'python' does not exist." on MAC api.list_members 出错:TweepError: [{'code': 34, 'message': '对不起,该页面不存在。'}] - Error with api.list_members: TweepError: [{'code': 34, 'message': 'Sorry, that page does not exist.'}]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM