From 2a779643bd0534360e1a194aca4480c360214582 Mon Sep 17 00:00:00 2001 From: Blake Eggleston Date: Sat, 6 Jul 2013 08:32:23 -0700 Subject: [PATCH] fixing the default value on the example partition key --- README.md | 2 +- docs/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 10531060..23516e78 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ from cqlengine.models import Model class ExampleModel(Model): read_repair_chance = 0.05 # optional - defaults to 0.1 - example_id = columns.UUID(primary_key=True) + example_id = columns.UUID(primary_key=True, default=uuid.uuid4) example_type = columns.Integer(index=True) created_at = columns.DateTime() description = columns.Text(required=False) diff --git a/docs/index.rst b/docs/index.rst index 9dff72fd..2053e359 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,7 +36,7 @@ Getting Started from cqlengine import Model class ExampleModel(Model): - example_id = columns.UUID(primary_key=True) + example_id = columns.UUID(primary_key=True, default=uuid.uuid4) example_type = columns.Integer(index=True) created_at = columns.DateTime() description = columns.Text(required=False)