def get_queryset(self): try: return SingleObjectMixin.get_queryset(self) except AttributeError: return self.model.objects()