Skip to content

Instantly share code, notes, and snippets.

@sanajaved7
Created May 11, 2016 15:41
Show Gist options
  • Save sanajaved7/7f6069f2e93b798dcb71ba31ededbdf8 to your computer and use it in GitHub Desktop.
Save sanajaved7/7f6069f2e93b798dcb71ba31ededbdf8 to your computer and use it in GitHub Desktop.
from wagtail.wagtailembeds.models import Embed
embeds = Embed.objects.all()
# at index 4 was the particular embed object I wanted to change
embeds[4].html = embeds[4].html.replace('http:', 'https:')
embeds[4].save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment