aboutsummaryrefslogtreecommitdiffstats
path: root/examples/resourceexample
diff options
context:
space:
mode:
Diffstat (limited to 'examples/resourceexample')
-rw-r--r--examples/resourceexample/forms.py1
-rw-r--r--examples/resourceexample/views.py8
2 files changed, 6 insertions, 3 deletions
diff --git a/examples/resourceexample/forms.py b/examples/resourceexample/forms.py
index aa6e7685..d21d601a 100644
--- a/examples/resourceexample/forms.py
+++ b/examples/resourceexample/forms.py
@@ -1,5 +1,6 @@
from django import forms
+
class MyForm(forms.Form):
foo = forms.BooleanField(required=False)
bar = forms.IntegerField(help_text='Must be an integer.')
diff --git a/examples/resourceexample/views.py b/examples/resourceexample/views.py
index 8e7be302..41a3111c 100644
--- a/examples/resourceexample/views.py
+++ b/examples/resourceexample/views.py
@@ -16,9 +16,11 @@ class ExampleView(View):
Handle GET requests, returning a list of URLs pointing to
three other views.
"""
- urls = [reverse('another-example', request, kwargs={'num': num})
- for num in range(3)]
- return Response({"Some other resources": urls})
+ resource_urls = [reverse('another-example',
+ kwargs={'num': num},
+ request=request)
+ for num in range(3)]
+ return Response({"Some other resources": resource_urls})
class AnotherExampleView(View):