@@ 13,10 13,13 @@ class ArticleMixin(TemplateResponseMixin):
self.article = article
self.children_slice = []
if settings.SHOW_MAX_CHILDREN > 0:
- for child in self.article.get_children(max_num=settings.SHOW_MAX_CHILDREN+1,
- articles__article__current_revision__deleted=False,
- user_can_read=request.user):
- self.children_slice.append(child)
+ try:
+ for child in self.article.get_children(max_num=settings.SHOW_MAX_CHILDREN+1,
+ articles__article__current_revision__deleted=False,
+ user_can_read=request.user):
+ self.children_slice.append(child)
+ except AttributeError, e:
+ raise Exception("Attribute error most likely caused by wrong MPTT version. Use 0.5.3+.\n\n" + str(e))
return super(ArticleMixin, self).dispatch(request, *args, **kwargs)
def get_context_data(self, **kwargs):