diff options
| author | Tom Christie | 2012-02-23 09:21:01 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-02-23 09:21:01 +0000 |
| commit | e15494a172f19d9388c0888fb566907aad95de0c (patch) | |
| tree | d7c8f83fe93a3bade46ac5533f5bc8121a3cf332 /examples/blogpost/models.py | |
| parent | 2b59df004a5bb7449aa4c07277ac846c330a79f7 (diff) | |
| download | django-rest-framework-e15494a172f19d9388c0888fb566907aad95de0c.tar.bz2 | |
Remove InstanceMixin auto-url magicks.
Diffstat (limited to 'examples/blogpost/models.py')
| -rw-r--r-- | examples/blogpost/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/blogpost/models.py b/examples/blogpost/models.py index d77f530d..10732ab4 100644 --- a/examples/blogpost/models.py +++ b/examples/blogpost/models.py @@ -2,6 +2,7 @@ from django.db import models from django.template.defaultfilters import slugify import uuid + def uuid_str(): return str(uuid.uuid1()) @@ -14,6 +15,7 @@ RATING_CHOICES = ((0, 'Awful'), MAX_POSTS = 10 + class BlogPost(models.Model): key = models.CharField(primary_key=True, max_length=64, default=uuid_str, editable=False) title = models.CharField(max_length=128) @@ -37,4 +39,3 @@ class Comment(models.Model): comment = models.TextField() rating = models.IntegerField(blank=True, null=True, choices=RATING_CHOICES, help_text='How did you rate this post?') created = models.DateTimeField(auto_now_add=True) - |
