aboutsummaryrefslogtreecommitdiffstats
path: root/examples/blogpost/models.py
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-02-19 10:26:27 +0000
committertom christie tom@tomchristie.com2011-02-19 10:26:27 +0000
commit805aa03ec1871f6a766d9052b348ddce9e9843c3 (patch)
tree8ab5b6a7396236aa45bbc61e8404cc77fc75a9c5 /examples/blogpost/models.py
parentb749b950a1b4bede76b7e3900a6385779904902d (diff)
downloaddjango-rest-framework-805aa03ec1871f6a766d9052b348ddce9e9843c3.tar.bz2
Yowzers. Final big bunch of refactoring for 0.1 release. Now support Django 1.3's views, admin style api is all polished off, loads of tests, new test project for running the test. All sorts of goodness. Getting ready to push this out now.
Diffstat (limited to 'examples/blogpost/models.py')
-rw-r--r--examples/blogpost/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/blogpost/models.py b/examples/blogpost/models.py
index e1968415..c85ca788 100644
--- a/examples/blogpost/models.py
+++ b/examples/blogpost/models.py
@@ -24,13 +24,13 @@ class BlogPost(models.Model):
@models.permalink
def get_absolute_url(self):
- return ('blogpost.views.BlogPostInstance', (), {'key': self.key})
+ return ('blog-post', (), {'key': self.key})
@property
@models.permalink
def comments_url(self):
"""Link to a resource which lists all comments for this blog post."""
- return ('blogpost.views.CommentRoot', (), {'blogpost_id': self.key})
+ return ('comments', (), {'blogpost_id': self.key})
def __unicode__(self):
return self.title
@@ -52,11 +52,11 @@ class Comment(models.Model):
@models.permalink
def get_absolute_url(self):
- return ('blogpost.views.CommentInstance', (), {'blogpost': self.blogpost.key, 'id': self.id})
+ return ('comment', (), {'blogpost': self.blogpost.key, 'id': self.id})
@property
@models.permalink
def blogpost_url(self):
"""Link to the blog post resource which this comment corresponds to."""
- return ('blogpost.views.BlogPostInstance', (), {'key': self.blogpost.key})
+ return ('blog-post', (), {'key': self.blogpost.key})