Skip to content

Docs: Fix example with wrong key in Embedding Image with dict format#89

Open
DutchGerman wants to merge 2 commits intoMiksus:masterfrom
DutchGerman:docs/fix-embed-image-dict-format
Open

Docs: Fix example with wrong key in Embedding Image with dict format#89
DutchGerman wants to merge 2 commits intoMiksus:masterfrom
DutchGerman:docs/fix-embed-image-dict-format

Conversation

@DutchGerman
Copy link

In the docs on the page Embedding Image with dict format the following example is given:

gmail.send(
    subject='An image',
    receivers=['first.last@example.com'],
    html="""
        <h1>This is an image:</h1>
        {{ myimage }}
    """,
    body_images={
        'myimage': {
            'myimage': data_as_bytes,
            'subtype': 'png'
        }
    }
)

Yet the dict expects content instead of myimages as seen in the tests

'my_image': {
"content": img_bytes,
'subtype': 'jpg'
}

@DutchGerman DutchGerman changed the title Fix example with wrong key in Embedding Image with dict format Docs: Fix example with wrong key in Embedding Image with dict format Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant