(apps, schema_editor)
return
Gives project and recipe ranks a sequential order.
Gives project and recipe ranks a sequential order.
Gives project and recipe ranks a sequential order .
def order_rank(apps, schema_editor):
    """
    Gives project and recipe ranks a sequential order.
    """

    projects = apps.get_model('recipes', 'Project')
    projects = projects.objects.all()
    recipes = apps.get_model('recipes', 'Analysis')
    recipes = recipes.objects.all()

    # Update the ranks to be pk's.

    for prj in projects:
        prj.rank = prj.pk
        prj.save()

    for rec in recipes:
        rec.rank = rec.pk
        rec.save()

    return
def order_rank ( apps , schema_editor ) : projects = apps . get_model ( 'recipes' , 'Project' ) projects = projects . objects . all ( ) recipes = apps . get_model ( 'recipes' , 'Analysis' ) recipes = recipes . objects . all ( ) # Update the ranks to be pk's. for prj in projects : prj . rank = prj . pk prj . save ( ) for rec in recipes : rec . rank = rec . pk rec . save ( ) return