diff options
| author | Tom Christie | 2010-12-30 13:52:46 +0000 |
|---|---|---|
| committer | Tom Christie | 2010-12-30 13:52:46 +0000 |
| commit | abb55a490964790a65ad5ef32397c6046d03d889 (patch) | |
| tree | 944ff8c725822390c5934e7d1c44e82b8b5b036a /src/testapp/views.py | |
| parent | 8a12f89aaacfc0839d6ab1e62b4b5046930517ba (diff) | |
| download | django-rest-framework-abb55a490964790a65ad5ef32397c6046d03d889.tar.bz2 | |
Add styling and urlizing to html views of resources
Diffstat (limited to 'src/testapp/views.py')
| -rw-r--r-- | src/testapp/views.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testapp/views.py b/src/testapp/views.py index f0174414..eca4c0ae 100644 --- a/src/testapp/views.py +++ b/src/testapp/views.py @@ -1,6 +1,15 @@ -from decimal import Decimal from rest.resource import Resource +class RootResource(Resource): + """This is my docstring + """ + allowed_methods = ('GET',) + + def read(self, headers={}, *args, **kwargs): + return (200, {'read-only-api': self.reverse(ReadOnlyResource), + 'write-only-api': self.reverse(MirroringWriteResource)}, {}) + + class ReadOnlyResource(Resource): """This is my docstring """ |
