Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Datawrapper API to get embed codes #1760

Open
7 tasks
nmorduch opened this issue Jun 23, 2022 · 0 comments
Open
7 tasks

Use Datawrapper API to get embed codes #1760

nmorduch opened this issue Jun 23, 2022 · 0 comments
Assignees
Labels
tool/python python, django, wagtail

Comments

@nmorduch
Copy link
Contributor

Rather than requiring people enter the entire embed code into a Datawrapper embed Streamfield block, have them just enter the chart ID (which they do already enter, it just doesn't do anything) and use the Datawrapper API to grab the embed code on save. I think the best way to do this is to have checkboxes re whether to overwrite each thing, so that you're not required to have lots of things happen automatically

  • Optionally overwrite embed code on save based on chart ID
    • Once this is working, we might want to just hide the embed code from the editor, since it really won't be necessary
  • Get image via Datawrapper API (make sure to do this in a way where it's still possible to manually upload the image, since sometimes the image that's pulled automatically isn't right)
    • On save, if no fallback image, get fallback image
    • Ideally add a checkbox for: if checked, then on save, update image (update the image model rather than adding a new one)
  • Add a checkbox for republishing the chart on save
  • Ideally have some sort of note on save that makes sure you know chart info will be overwritten (in case you're editing something else and you didn't realize there were charts that would be messed with)
@nmorduch nmorduch added the tool/python python, django, wagtail label Jun 23, 2022
@nmorduch nmorduch self-assigned this Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool/python python, django, wagtail
Projects
None yet
Development

No branches or pull requests

1 participant