def create_invite_badges(app, created_models, verbosity, **kwargs): badges.api.create_badge("three_invites", "Three Invites", "You invited three people") badges.api.create_badge("five_invites", "Five Invites", "You invited five people") badges.api.create_badge("ten_invites", "Ten Invites", "You invited ten people") for u in User.objects.all(): update_badges(u)
def update_invite_badges(sender, instance, created, **kwargs): user = instance.creator update_badges(user)