Exemple #1
0
def addto_all(request):
    amount = int(request.POST.get("amount"))
    InvitationStat.add_invites(amount)
    return HttpResponse(json.dumps(
        {"inner-fragments": {
            ".amount-added": amount
        }}),
                        content_type="application/json")
Exemple #2
0
    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.add_invites(num_of_invites)
Exemple #3
0
 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.add_invites(num_of_invites)
Exemple #4
0
def addto_all(request):
    amount = int(request.POST.get("amount"))
    InvitationStat.add_invites(amount)
    return HttpResponse(json.dumps({
        "inner-fragments": {".amount-added": amount}
    }), content_type="application/json")