def get_item(request, tag_id): """Item data""" if settings.ENV == "production": try: data, code, item = resource.get_item(request, tag_id) except: return {"code": "tag/get_item/fail"}, 404 else: data, code, item = resource.get_item(request, tag_id) return data, code
def get_item(request, html_cache_id): """Item data""" if settings.ENV == 'production': try: data, code, item = resource.get_item(request, html_cache_id) except: return {'code': 'html_cache/get_item/fail'}, 404 else: data, code, item = resource.get_item(request, html_cache_id) return data, code
def get_item(request, public_link_id): """Item data""" if settings.ENV == 'production': try: data, code, item = resource.get_item(request, public_link_id) except: return {'code': 'public_link/get_item/fail'}, 404 else: data, code, item = resource.get_item(request, public_link_id) return data, code