Exemple #1
0
def update_organisation_tiers():
    organisations = Organisation.scan()
    tiers = ['tier_one', 'tier_two', 'tier_three']

    for organisation in organisations:
        conn.put_item('django-dynamo-example',
                      organisation.pk,
                      organisation.sk,
                      attributes=dict(tier=random.choice(tiers)))