

@property
def object(self):
    try:
        obj = Page.objects.get(id=self.kwargs['page_id'])
    except Exception as e:
        messages.error(self.request, str(e))
    return obj

dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/web/page/common/views.py PageObjectMixin.object/original