def handle(self, *args, **options): self.makeBadge(u"출제자") self.makeBadge(u"유단자") self.makeBadge(u"사부님") for profile in Profile.objects.all(): profile.update_badge() self.stdout.write("%s badge update completed." % profile.email) clear_rank() self.stdout.write('Successfully badge was updated.')
def handle(self, *args, **options): for profile in Profile.objects.all(): profile.update_belt() self.stdout.write("%s belt update completed." % profile.email) clear_rank() self.stdout.write('Successfully belt was updated.')
def belt(): for profile in Profile.objects.all(): profile.update_belt() print profile, "belt update completed." clear_rank()