Beispiel #1
0
def serialize(context, obj):
    if 'request' in context:
        user = context['request'].user
    else:
        user = None

    return convert_to_json(serialize_func(obj, user))
Beispiel #2
0
def serialize(context, obj):
    if 'request' in context:
        user = context['request'].user
    else:
        user = None

    return mark_safe(json.dumps(serialize_func(obj, user)))
Beispiel #3
0
def serialize(context, obj):
    if "request" in context:
        user = context["request"].user
    else:
        user = None

    return convert_to_json(serialize_func(obj, user))
Beispiel #4
0
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))
Beispiel #5
0
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)
Beispiel #6
0
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)
Beispiel #7
0
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)
Beispiel #9
0
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)