Пример #1
0
def deliver_product(user, product_id):
    try:
        product = COIN_PRODUCTS[product_id]
        economy.credit(user, product['amount'])
    except KeyError:
        product = BRUSH_PRODUCTS[product_id]
        Brush.objects.get(iap_product_id=product_id).unlock_for_user(user)
Пример #2
0
def deliver_product(user, product_id):
    try:
        product = COIN_PRODUCTS[product_id]
        economy.credit(user, product['amount'])
    except KeyError:
        product = BRUSH_PRODUCTS[product_id]
        Brush.objects.get(iap_product_id=product_id).unlock_for_user(user)
 def handle(self, *args, **options):
     for comment_id in preloaded_explore_comment_ids():
         comment = QuestComment.objects.get(id=comment_id)
         author = comment.author
         print author.username
         Actions.featured_in_explore(author, comment, defer=False)
         economy.credit(author, knobs.REWARDS['featured_in_explore'])
Пример #4
0
def staff_gift_coins(request, username, amount):
    amount = int(amount)

    if amount > 400:
        raise ServiceError("Can't gift more than 400 at a time (sanity check).")

    user = get_object_or_404(User, username=username)
    economy.credit(user, amount)
Пример #5
0
def staff_gift_coins(request, username, amount):
    amount = int(amount)

    if amount > 400:
        raise ServiceError(
            "Can't gift more than 400 at a time (sanity check).")

    user = get_object_or_404(User, username=username)
    economy.credit(user, amount)
Пример #6
0
def deliver_product(user, product_id):
    product = COIN_PRODUCTS[product_id]
    economy.credit(user, product["amount"])
Пример #7
0
def deliver_product(user, product_id):
    product = COIN_PRODUCTS[product_id]
    economy.credit(user, product['amount'])