コード例 #1
0
ファイル: views.py プロジェクト: john2x/kaleo
def topoff_all(request):
    amount = int(request.POST.get("amount"))
    InvitationStat.topoff(amount)
    return HttpResponse(json.dumps(
        {"inner-fragments": {
            ".invite-total": amount
        }}),
                        content_type="application/json")
コード例 #2
0
ファイル: topoff_invites.py プロジェクト: finid/kaleo
 def handle(self, *args, **kwargs):
     if len(args) == 0:
         sys.exit("You must supply the number of invites as an argument.")
     
     try:
         num_of_invites = int(args[0])
     except ValueError:
         sys.exit("The argument for number of invites must be an integer.")
     
     InvitationStat.topoff(num_of_invites)
コード例 #3
0
ファイル: views.py プロジェクト: exitio/kaleo
def topoff_all(request):
    amount = int(request.POST.get("amount"))
    InvitationStat.topoff(amount)
    return HttpResponse(json.dumps({
        "inner-fragments": {".invite-total": amount}
    }), content_type="application/json")