4 from django
.db
import models
, migrations
7 def set_restriction(apps
, schema_editor
):
8 Podcast
= apps
.get_model("podcasts", "Podcast")
9 for podcast
in Podcast
.objects
.filter(restrictions__isnull
=True):
10 podcast
.restrictions
= ""
14 class Migration(migrations
.Migration
):
16 dependencies
= [("podcasts", "0015_auto_20140616_2126")]
19 migrations
.RunPython(set_restriction
),
20 migrations
.AlterField(
23 field
=models
.CharField(default
="", max_length
=20, blank
=True),