Commit 078b4c54 by Stephan Groß

Merge pull request #496 from cmurtaugh/master

Tutorial pt. 3 refers to SingleObjectBaseView; should be SingleObjectAPIView
parents 85bf4164 9188d487
...@@ -109,7 +109,7 @@ The base class provides the core functionality, and the mixin classes provide th ...@@ -109,7 +109,7 @@ The base class provides the core functionality, and the mixin classes provide th
class SnippetDetail(mixins.RetrieveModelMixin, class SnippetDetail(mixins.RetrieveModelMixin,
mixins.UpdateModelMixin, mixins.UpdateModelMixin,
mixins.DestroyModelMixin, mixins.DestroyModelMixin,
generics.SingleObjectBaseView): generics.SingleObjectAPIView):
model = Snippet model = Snippet
serializer_class = SnippetSerializer serializer_class = SnippetSerializer
...@@ -122,7 +122,7 @@ The base class provides the core functionality, and the mixin classes provide th ...@@ -122,7 +122,7 @@ The base class provides the core functionality, and the mixin classes provide th
def delete(self, request, *args, **kwargs): def delete(self, request, *args, **kwargs):
return self.destroy(request, *args, **kwargs) return self.destroy(request, *args, **kwargs)
Pretty similar. This time we're using the `SingleObjectBaseView` class to provide the core functionality, and adding in mixins to provide the `.retrieve()`, `.update()` and `.destroy()` actions. Pretty similar. This time we're using the `SingleObjectAPIView` class to provide the core functionality, and adding in mixins to provide the `.retrieve()`, `.update()` and `.destroy()` actions.
## Using generic class based views ## Using generic class based views
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment