(request, uid, board)
return board_items
Used to append instance.uid into request.session[board]
Used to append instance.uid into request.session[board]
Used to append instance . uid into request . session [ board ]
def copy_uid(request, uid, board):
    """
    Used to append instance.uid into request.session[board]
    """
    if request.user.is_anonymous:
        messages.error(request, "You need to be logged in.")
        return []

    # Get the clipboard item
    clipboard = request.session.get(settings.CLIPBOARD_NAME, {})
    board_items = clipboard.get(board) or []
    board_items.append(uid)

    # No duplicates in clipboard
    clipboard = {board: list(set(board_items))}

    # Clear the clipboard before copying items.
    clear(request=request)

    request.session.update({settings.CLIPBOARD_NAME: clipboard})

    return board_items
def copy_uid ( request , uid , board ) : if request . user . is_anonymous : messages . error ( request , "You need to be logged in." ) return [ ] # Get the clipboard item clipboard = request . session . get ( settings . CLIPBOARD_NAME , { } ) board_items = clipboard . get ( board ) or [ ] board_items . append ( uid ) # No duplicates in clipboard clipboard = { board : list ( set ( board_items ) ) } # Clear the clipboard before copying items. clear ( request = request ) request . session . update ( { settings . CLIPBOARD_NAME : clipboard } ) return board_items