def updatedata(): for number in TWILIO_FROM_NUMBERS: client.add_from_number(number) # add subscribers for listname in MONGO_COLLECTIONS_LIST: print listname client.get_or_create_subscription_list(listname) numbers = get_numbers(listname) for number in numbers: client.add_to_number(number, subs=[listname]) return redirect('/?msg=laoded')
def loaddata(): # add from numbers for number in TWILIO_FROM_NUMBERS: client.add_from_number(number) # add subscribers for listname in MONGO_COLLECTIONS_LIST: print listname client.get_or_create_subscription_list(listname) numbers = get_numbers(listname) for number in numbers: client.add_to_number(number, subs=[listname])