Created
March 7, 2024 11:18
-
-
Save patillacode/2b133076a9b3fc9a08517e92a3a2e177 to your computer and use it in GitHub Desktop.
Wagtail - Avoid Streamfields in Django migrations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wagtail.fields | |
def deconstruct_without_block_definition(self): | |
name, path, _, kwargs = super(wagtail.fields.StreamField, self).deconstruct() | |
block_types = list() | |
args = [block_types] | |
return name, path, args, kwargs | |
wagtail.fields.StreamField.deconstruct = deconstruct_without_block_definition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment