Skip to content

Commit

Permalink
Using custom model in CategoryDetailView
Browse files Browse the repository at this point in the history
  • Loading branch information
enverbisevac committed Jul 29, 2013
1 parent a254fe9 commit 451af0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion categories/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def get_object(self, **kwargs):
if self.queryset is None:
queryset = self.get_queryset()
try:
return get_category_for_path(self.kwargs[self.path_field])
return get_category_for_path(self.kwargs[self.path_field], self.model.objects.all())
except ObjectDoesNotExist:
raise Http404(_(u"No %(verbose_name)s found matching the query") %
{'verbose_name': queryset.model._meta.verbose_name})
Expand Down

0 comments on commit 451af0e

Please sign in to comment.