From d934824bff21e4a11226af61efba319be227f4f0 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 5 Sep 2014 16:29:46 +0100 Subject: Workin on --- rest_framework/generics.py | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'rest_framework/generics.py') diff --git a/rest_framework/generics.py b/rest_framework/generics.py index 6705cbb2..c2c59154 100644 --- a/rest_framework/generics.py +++ b/rest_framework/generics.py @@ -27,7 +27,7 @@ def strict_positive_int(integer_string, cutoff=None): def get_object_or_404(queryset, *filter_args, **filter_kwargs): """ - Same as Django's standard shortcut, but make sure to raise 404 + Same as Django's standard shortcut, but make sure to also raise 404 if the filter_kwargs don't match the required types. """ try: @@ -249,34 +249,6 @@ class GenericAPIView(views.APIView): # # The are not called by GenericAPIView directly, # but are used by the mixin methods. - - def pre_save(self, obj): - """ - Placeholder method for calling before saving an object. - - May be used to set attributes on the object that are implicit - in either the request, or the url. - """ - pass - - def post_save(self, obj, created=False): - """ - Placeholder method for calling after saving an object. - """ - pass - - def pre_delete(self, obj): - """ - Placeholder method for calling before deleting an object. - """ - pass - - def post_delete(self, obj): - """ - Placeholder method for calling after deleting an object. - """ - pass - def metadata(self, request): """ Return a dictionary of metadata about the view. -- cgit v1.2.3