def serialize(context, obj): if 'request' in context: user = context['request'].user else: user = None return convert_to_json(serialize_func(obj, user))
def serialize(context, obj): if 'request' in context: user = context['request'].user else: user = None return mark_safe(json.dumps(serialize_func(obj, user)))
def serialize(context, obj): if "request" in context: user = context["request"].user else: user = None return convert_to_json(serialize_func(obj, user))
def serialize_detailed_org(context, obj): if 'request' in context: user = context['request'].user else: user = None context = serialize_func( obj, user, DetailedOrganizationSerializer(), ) return mark_safe(json.dumps(context))
def serialize_detailed_org(context, obj): if "request" in context: user = context["request"].user access = from_user(user, obj) else: user = None access = NoAccess() context = serialize_func( obj, user, DetailedOrganizationSerializerWithProjectsAndTeams(), access=access ) return convert_to_json(context)
def serialize_detailed_org(context, obj): if 'request' in context: user = context['request'].user else: user = None context = serialize_func( obj, user, DetailedOrganizationSerializer(), ) return convert_to_json(context)
def serialize_detailed_org(context, obj): if 'request' in context: user = context['request'].user access = from_user(user, obj) else: user = None access = NoAccess() context = serialize_func(obj, user, DetailedOrganizationSerializer(), access=access) return convert_to_json(context)
def serialize_detailed_org(context, obj): if 'request' in context: user = context['request'].user access = from_user(user, obj) else: user = None access = NoAccess() context = serialize_func( obj, user, DetailedOrganizationSerializer(), access=access ) return convert_to_json(context)