aboutsummaryrefslogtreecommitdiffstats
path: root/examples/resourceexample/views.py
diff options
context:
space:
mode:
authorTom Christie2012-02-23 08:58:10 +0000
committerTom Christie2012-02-23 08:58:10 +0000
commit2b59df004a5bb7449aa4c07277ac846c330a79f7 (patch)
tree3a5e20948d3cd0ea1ca4d25ff35d970646722a30 /examples/resourceexample/views.py
parent8e0b9e55ecb0733369918d4562ba38ba505cdfe8 (diff)
downloaddjango-rest-framework-2b59df004a5bb7449aa4c07277ac846c330a79f7.tar.bz2
reverse takes request as a kwarg for compatibility with django's reverse
Diffstat (limited to 'examples/resourceexample/views.py')
-rw-r--r--examples/resourceexample/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/resourceexample/views.py b/examples/resourceexample/views.py
index 1b5b8e9c..fcd0b273 100644
--- a/examples/resourceexample/views.py
+++ b/examples/resourceexample/views.py
@@ -15,7 +15,7 @@ class ExampleView(View):
"""
Handle GET requests, returning a list of URLs pointing to 3 other views.
"""
- return {"Some other resources": [reverse('another-example', request, kwargs={'num':num}) for num in range(3)]}
+ return {"Some other resources": [reverse('another-example', kwargs={'num':num}, request=request) for num in range(3)]}
class AnotherExampleView(View):