class LegacyGetUserUserSerializer(serializers.ModelSerializer): profile = GetUserUserProfileSerializer(many=False) followers_count = FollowersCountField() following_count = FollowingCountField() posts_count = UserPostsCountField() is_following = IsFollowingField() is_followed = IsFollowedField() are_new_post_notifications_enabled = AreNewPostNotificationsEnabledForUserField() is_connected = IsConnectedField() is_fully_connected = IsFullyConnectedField() connected_circles = ConnectedCirclesField(circle_serializer=GetUserUserCircleSerializer) follow_lists = FollowListsField(list_serializer=GetUserUserListSerializer) is_pending_connection_confirmation = IsPendingConnectionConfirmation() is_reported = IsUserReportedField() class Meta: model = User fields = ( 'id', 'username', 'profile', 'followers_count', 'following_count', 'posts_count', 'is_following', 'is_followed', 'are_new_post_notifications_enabled', 'is_connected', 'is_reported', 'is_fully_connected', 'connected_circles', 'follow_lists', 'date_joined', 'is_pending_connection_confirmation' )
class GetUserUserSerializer(serializers.ModelSerializer): profile = GetUserUserProfileSerializer(many=False) followers_count = FollowersCountField() following_count = FollowingCountField() posts_count = PostsCountField() is_following = IsFollowingField() is_connected = IsConnectedField() is_fully_connected = IsFullyConnectedField() connected_circles = ConnectedCirclesField(circle_serializer=GetUserUserCircleSerializer) follow_lists = FollowListsField(list_serializer=GetUserUserListSerializer) is_pending_connection_confirmation = IsPendingConnectionConfirmation() class Meta: model = User fields = ( 'id', 'username', 'profile', 'followers_count', 'following_count', 'posts_count', 'is_following', 'is_connected', 'is_fully_connected', 'connected_circles', 'follow_lists', 'is_pending_connection_confirmation' )
class GetUsersUserSerializer(serializers.ModelSerializer): profile = GetUsersUserProfileSerializer(many=False) is_following = IsFollowingField() is_connected = IsConnectedField() class Meta: model = User fields = ('id', 'profile', 'username', 'is_following', 'is_connected')
class GetBlockedUserSerializer(serializers.ModelSerializer): is_blocked = IsBlockedField() is_following = IsFollowingField() is_connected = IsConnectedField() is_fully_connected = IsFullyConnectedField() class Meta: model = User fields = ('id', 'is_blocked', 'is_following', 'is_connected', 'is_fully_connected')
class GetCommunityMembersMemberSerializer(serializers.ModelSerializer): profile = GetCommunityMembersMemberProfileSerializer(many=False) is_following = IsFollowingField() are_new_post_notifications_enabled = AreNewPostNotificationsEnabledForUserField( ) is_connected = IsConnectedField() is_followed = IsFollowedField() class Meta: model = User fields = ('id', 'is_following', 'is_followed', 'are_new_post_notifications_enabled', 'is_connected', 'username', 'profile')
class ConnectionUserSerializer(serializers.ModelSerializer): profile = ConnectionUserProfileSerializer(many=False) is_connected = IsConnectedField() is_following = IsFollowingField() connected_circles = ConnectedCirclesField( circle_serializer=ConnectionUserCircleSerializer) is_pending_connection_confirmation = IsPendingConnectionConfirmation() is_fully_connected = IsFullyConnectedField() class Meta: model = User fields = ('id', 'username', 'profile', 'is_connected', 'is_fully_connected', 'is_following', 'connected_circles', 'is_pending_connection_confirmation')
class LinkedUsersUserSerializer(serializers.ModelSerializer): profile = LinkedUsersUserProfileSerializer(many=False) is_following = IsFollowingField() is_connected = IsConnectedField() communities_memberships = CommunitiesMembershipsField( community_membership_serializer= GetLinkedUsersUserCommunityMembershipSerializer) communities_invites = CommunitiesInvitesField( community_invite_serializer=GetLinkedUsersUserCommunityInviteSerializer ) class Meta: model = User fields = ('id', 'profile', 'username', 'is_following', 'is_connected', 'communities_invites', 'communities_memberships')
class GetBlockedUserSerializer(serializers.ModelSerializer): is_blocked = IsBlockedField() is_following = IsFollowingField() are_new_post_notifications_enabled = AreNewPostNotificationsEnabledForUserField() is_connected = IsConnectedField() is_fully_connected = IsFullyConnectedField() class Meta: model = User fields = ( 'id', 'is_blocked', 'is_following', 'are_new_post_notifications_enabled', 'is_connected', 'is_fully_connected' )
class LinkedUsersUserSerializer(serializers.ModelSerializer): profile = LinkedUsersUserProfileSerializer(many=False) is_following = IsFollowingField() are_new_post_notifications_enabled = AreNewPostNotificationsEnabledForUserField( ) is_connected = IsConnectedField() communities_memberships = CommunitiesMembershipsField( community_membership_serializer= GetLinkedUsersUserCommunityMembershipSerializer) communities_invites = CommunitiesInvitesField( community_invite_serializer=GetLinkedUsersUserCommunityInviteSerializer ) class Meta: model = User fields = ('id', 'profile', 'username', 'is_following', 'are_new_post_notifications_enabled', 'is_connected', 'communities_invites', 'communities_memberships')
class ConnectionUserSerializer(serializers.ModelSerializer): profile = ConnectionUserProfileSerializer(many=False) is_connected = IsConnectedField() is_following = IsFollowingField() are_new_post_notifications_enabled = AreNewPostNotificationsEnabledForUserField() connected_circles = ConnectedCirclesField(circle_serializer=ConnectionUserCircleSerializer) is_pending_connection_confirmation = IsPendingConnectionConfirmation() is_fully_connected = IsFullyConnectedField() class Meta: model = User fields = ( 'id', 'username', 'profile', 'is_connected', 'is_fully_connected', 'is_following', 'are_new_post_notifications_enabled', 'connected_circles', 'is_pending_connection_confirmation' )