diff options
| author | Tom Christie | 2013-04-09 18:45:15 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-04-09 18:45:15 +0100 | 
| commit | 099163f81f9d89746de50f3aed2955ead54dba4e (patch) | |
| tree | f72935d65c9e6f42d0d19f76cb23ba06d4c0ede7 /rest_framework/mixins.py | |
| parent | c73d0e1e39e661c7324eb0df8c3ce6e18f57915b (diff) | |
| download | django-rest-framework-099163f81f9d89746de50f3aed2955ead54dba4e.tar.bz2 | |
Removed SingleObjectMixin and MultipleObjectMixin
Diffstat (limited to 'rest_framework/mixins.py')
| -rw-r--r-- | rest_framework/mixins.py | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py index c700602e..b15cb11f 100644 --- a/rest_framework/mixins.py +++ b/rest_framework/mixins.py @@ -72,8 +72,7 @@ class ListModelMixin(object):          # Default is to allow empty querysets.  This can be altered by setting          # `.allow_empty = False`, to raise 404 errors on empty querysets. -        allow_empty = self.get_allow_empty() -        if not allow_empty and not self.object_list: +        if not self.allow_empty and not self.object_list:              class_name = self.__class__.__name__              error_msg = self.empty_error % {'class_name': class_name}              raise Http404(error_msg) @@ -148,7 +147,7 @@ class UpdateModelMixin(object):          # pk and/or slug attributes are implicit in the URL.          pk = self.kwargs.get(self.pk_url_kwarg, None)          slug = self.kwargs.get(self.slug_url_kwarg, None) -        slug_field = slug and self.get_slug_field() or None +        slug_field = slug and self.slug_field or None          if pk:              setattr(obj, 'pk', pk) | 
