Try registering django_comments after zinnia in the INSTALLED_APPS setting not before.
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sites', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.contenttypes', 'mptt', 'tagging', 'zinnia', 'django_comments', )
Got this solution from the owner of repo. Check the issue on Github.
--On Tue, Sep 27, 2016 at 12:27 AM, Shazia Nusrat <shazianusra@gmail.com> wrote:--I am trying to fix issue with Zinnia blog application and its popping up error related to aggregator and entries. Following is the code if someone have a suggestion:
def get_authors(context, template='zinnia/tags/authors.
html' ): """ Return the published authors. """ entries = Entry.objects.all() return {'template': template, 'authors': Author.published.all().annotate ( count_entries_published=Count('entries' )), 'context_author': context.get('author')}Above I don't think causing any issue but below is the code that might be causing all the fuss in second last line.
def get_queryset(self): """ Return a queryset containing published entries. """ now = timezone.now() return super( EntryRelatedPublishedManager, self).get_queryset().filter( models.Q(entries__start_public
ation__lte =now) | models.Q(entries__start_publication =None), models.Q(entries__end_publication__gt =now) | models.Q(entries__end_publication =None), entries__status=PUBLISHED, entries__sites=Site.objects.get_current () ).distinct()Please suggest a solution because overall Zinnia is an impressive app but with one error its almost useless. Owner of the repo already got plenty of users with same complain. Error is same with both Python2 and PYthon3.
For generous coders willing to work on this, repo is located at https://github.com/Fantomas42/
django-blog-zinnia/issues .
Traceback: File "C:\Users\Shazia\zinblog\lib\s
ite-packages\django-1.10.1-py2 in inner 39. response = get_response(request) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\core\handlers\ exception.py" ite-packages\django-1.10.1-py2 in _legacy_get_response 249. response = self._get_response(request) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\core\handlers\ base.py" ite-packages\django-1.10.1-py2 in _get_response 217. response = self.process_exception_by_midd.7.egg\django\core\handlers\ base.py" leware (e, request) File "C:\Users\Shazia\zinblog\lib\site-packages\django-1.10.1-py2 in _get_response 215. response = response.render() File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\core\handlers\ base.py" ite-packages\django-1.10.1-py2 in render 109. self.content = self.rendered_content File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\respons e.py" ite-packages\django-1.10.1-py2 in rendered_content 86. content = template.render(context, self._request) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\respons e.py" ite-packages\django-1.10.1-py2 in render 66. return self.template.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\backend s\django.py" ite-packages\django-1.10.1-py2 in render 208. return self._render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in _render 199. return self.nodelist.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 994. bit = node.render_annotated(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render_annotated 961. return self.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 174. return compiled_parent._render(contex.7.egg\django\template\loader_ tags.py" t ) File "C:\Users\Shazia\zinblog\lib\site-packages\django-1.10.1-py2 in _render 199. return self.nodelist.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 994. bit = node.render_annotated(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render_annotated 961. return self.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 174. return compiled_parent._render(contex.7.egg\django\template\loader_ tags.py" t ) File "C:\Users\Shazia\zinblog\lib\site-packages\django-1.10.1-py2 in _render 199. return self.nodelist.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 994. bit = node.render_annotated(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render_annotated 961. return self.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 174. return compiled_parent._render(contex.7.egg\django\template\loader_ tags.py" t ) File "C:\Users\Shazia\zinblog\lib\site-packages\django-1.10.1-py2 in _render 199. return self.nodelist.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 994. bit = node.render_annotated(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render_annotated 961. return self.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 70. result = block.nodelist.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\loader_ tags.py" ite-packages\django-1.10.1-py2 in render 994. bit = node.render_annotated(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render_annotated 961. return self.render(context) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\base. py" ite-packages\django-1.10.1-py2 in render 225. _dict = self.func(*resolved_args, **resolved_kwargs) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\template\library .py" ite-packages\django_blog_zinni in get_authors 85. 'authors': Author.published.all().annotata-0.18-py2.7.egg\zinnia\templa tetags\zinnia.py" e ( File "C:\Users\Shazia\zinblog\lib\site-packages\django-1.10.1-py2 in all 160. return self.get_queryset() File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\db\models\manage r.py" ite-packages\django_blog_zinni in get_queryset 107. entries__sites=Site.objects.gea-0.18-py2.7.egg\zinnia\manage rs.py" t_current () File "C:\Users\Shazia\zinblog\lib\site-packages\django-1.10.1-py2 in filter 796. return self._filter_or_exclude(False, *args, **kwargs) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\db\models\query. py" ite-packages\django-1.10.1-py2 in _filter_or_exclude 814. clone.query.add_q(Q(*args, **kwargs)) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\db\models\query. py" ite-packages\django-1.10.1-py2 in add_q 1227. clause, _ = self._add_q(q_object, self.used_aliases) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\db\models\sql\ query.py" ite-packages\django-1.10.1-py2 in _add_q 1247. current_negated, allow_joins, split_subq) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\db\models\sql\ query.py" ite-packages\django-1.10.1-py2 in _add_q 1253. allow_joins=allow_joins, split_subq=split_subq, File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\db\models\sql\ query.py" ite-packages\django-1.10.1-py2 in build_filter 1133. lookups, parts, reffed_expression = self.solve_lookup_type(arg) File "C:\Users\Shazia\zinblog\lib\s.7.egg\django\db\models\sql\ query.py" ite-packages\django-1.10.1-py2 in solve_lookup_type 1019. _, field, _, lookup_parts = self.names_to_path(lookup_spli.7.egg\django\db\models\sql\ query.py" tted , self.get_meta()) File "C:\Users\Shazia\zinblog\lib\site-packages\django-1.10.1-py2 in names_to_path 1327. "Choices are: %s" % (name, ", ".join(available))) Exception Type: FieldError at /weblog/ Exception Value: Cannot resolve keyword 'entries' into field. Choices are: comment_comments, comment_flags, date_joined, email, first_name, groups, id, is_active, is_staff, is_superuser, last_login, last_name, logentry, password, user_permissions, username.7.egg\django\db\models\sql\ query.py"
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD83tOwWJXKj .jMorgCYFpzNy%3DX745_ EOziWd6maaF_hQH4KbkA%40mail. gmail.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANoUts7Lm- .x5WzuZsszCsCsK03Lk_ UUTaWgkDRjrUoqA-1yEig%40mail. gmail.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD83tOwJRtGJzNYYdM-yEJQwqG%2Bo06eQ_cr-NXYX%2B%2BfKsSDLYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment