예제 #1
0
파일: __init__.py 프로젝트: caminus/caminus
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)
예제 #2
0
파일: models.py 프로젝트: caminus/caminus
def update_invite_badges(sender, instance, created, **kwargs):
    user = instance.creator
    update_badges(user)