marcus-s
6/18/2016 - 10:14 PM

got moves specific migration function

got moves specific migration function

def foo(apps, _):
    Category = apps.get_model("main", "MoveCategory")
    for i, name in enumerate(DEFAULT_CATEGORY_NAMES):
        category = Category.objects.create(**{
            "name": name,
            "description": "",
            "one_handed": i % 2 == 0,
            "number_of_packets": None,
        })
        category.save()