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/resourceexample/views.py | |
| parent | 2b59df004a5bb7449aa4c07277ac846c330a79f7 (diff) | |
| download | django-rest-framework-e15494a172f19d9388c0888fb566907aad95de0c.tar.bz2 | |
Remove InstanceMixin auto-url magicks.
Diffstat (limited to 'examples/resourceexample/views.py')
| -rw-r--r-- | examples/resourceexample/views.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/resourceexample/views.py b/examples/resourceexample/views.py index fcd0b273..0db23804 100644 --- a/examples/resourceexample/views.py +++ b/examples/resourceexample/views.py @@ -15,7 +15,11 @@ class ExampleView(View): """ Handle GET requests, returning a list of URLs pointing to 3 other views. """ - return {"Some other resources": [reverse('another-example', kwargs={'num':num}, request=request) for num in range(3)]} + resource_urls = [reverse('another-example', + kwargs={'num': num}, + request=request) + for num in range(3)] + return {"Some other resources": resource_urls} class AnotherExampleView(View): |
