Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 属性错误位于/admin/fluent\u comments/fluentcomment/_Python_Django_Django Fluent - Fatal编程技术网

Python 属性错误位于/admin/fluent\u comments/fluentcomment/

Python 属性错误位于/admin/fluent\u comments/fluentcomment/,python,django,django-fluent,Python,Django,Django Fluent,尝试实现django_流畅的注释。它与另一个CLSS完美配合,但对于News,我有以下错误(尽管这些类基本相似): 回溯将我链接到注释模板: Error during template rendering In template /app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/templates/admin/change_list.html, error at line 91 'News' object

尝试实现django_流畅的注释。它与另一个CLSS完美配合,但对于News,我有以下错误(尽管这些类基本相似):

回溯将我链接到注释模板:

Error during template rendering

In template /app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/templates/admin/change_list.html, error at line 91
'News' object has no attribute 'get_absolute_url'

我不想在“news”类中添加get_absolute_url方法,因为我不明白为什么在其他情况下没有它它它也可以工作

我没有使用django_fluent_注释,但是如果您使用
获取绝对url
,应用程序会在视图和模板中使用该方法。如果该方法不存在,则似乎不会出现回退,因此您似乎无法避免创建该方法。我没有使用django_fluent_注释,但如果您用于
get_absolute_url
,则应用程序会在视图和模板中使用该方法。如果该方法不存在,则似乎没有回退,因此看起来您无法避免创建该方法。
Error during template rendering

In template /app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/templates/admin/change_list.html, error at line 91
'News' object has no attribute 'get_absolute_url'