aboutsummaryrefslogtreecommitdiffstats
path: root/src/testapp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/testapp/views.py')
-rw-r--r--src/testapp/views.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/testapp/views.py b/src/testapp/views.py
new file mode 100644
index 00000000..f0174414
--- /dev/null
+++ b/src/testapp/views.py
@@ -0,0 +1,21 @@
+from decimal import Decimal
+from rest.resource import Resource
+
+class ReadOnlyResource(Resource):
+ """This is my docstring
+ """
+ allowed_methods = ('GET',)
+
+ def read(self, headers={}, *args, **kwargs):
+ return (200, {'ExampleString': 'Example',
+ 'ExampleInt': 1,
+ 'ExampleDecimal': 1.0}, {})
+
+
+class MirroringWriteResource(Resource):
+ """This is my docstring
+ """
+ allowed_methods = ('PUT',)
+
+ def create(self, data, headers={}, *args, **kwargs):
+ return (200, data, {})