(apps, schema_editor)
Change badge uids to it's name
Change badge uids to it's name
Change badge uids to it s name
def badge_uids(apps, schema_editor):
    """
    Change badge uids to it's name
    """
    Badge = apps.get_model('forum', 'Badge')

    badges = Badge.objects.all()

    for badge in badges:

        badge.uid = slugify(badge.name)

        badge.save()
def badge_uids ( apps , schema_editor ) : Badge = apps . get_model ( 'forum' , 'Badge' ) badges = Badge . objects . all ( ) for badge in badges : badge . uid = slugify ( badge . name ) badge . save ( )