From 805aa03ec1871f6a766d9052b348ddce9e9843c3 Mon Sep 17 00:00:00 2001 From: tom christie tom@tomchristie.com Date: Sat, 19 Feb 2011 10:26:27 +0000 Subject: 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. --- examples/resourceexample/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/resourceexample/views.py') diff --git a/examples/resourceexample/views.py b/examples/resourceexample/views.py index e5bb5efa..c4462ee2 100644 --- a/examples/resourceexample/views.py +++ b/examples/resourceexample/views.py @@ -1,13 +1,14 @@ +from django.core.urlresolvers import reverse from djangorestframework.resource import Resource from djangorestframework.response import Response, status from resourceexample.forms import MyForm class ExampleResource(Resource): - """A basic read only resource that points to 3 other resources.""" + """A basic read-only resource that points to 3 other resources.""" allowed_methods = anon_allowed_methods = ('GET',) def get(self, request, auth): - return {"Some other resources": [self.reverse(AnotherExampleResource, num=num) for num in range(3)]} + return {"Some other resources": [reverse('another-example-resource', kwargs={'num':num}) for num in range(3)]} class AnotherExampleResource(Resource): """A basic GET-able/POST-able resource.""" -- cgit v1.2.3