diff options
| author | Sébastien Piquemal | 2012-02-10 11:05:20 +0200 |
|---|---|---|
| committer | Sébastien Piquemal | 2012-02-10 11:05:20 +0200 |
| commit | b33579a7a18c2cbc6e3789d4a7dc78c82fb0fe80 (patch) | |
| tree | acfb589dee7f5aea5937d3705e1e4eaa696ae879 /djangorestframework/mixins.py | |
| parent | db0b01037a95946938ccd44eae14d8779bfff1a9 (diff) | |
| download | django-rest-framework-b33579a7a18c2cbc6e3789d4a7dc78c82fb0fe80.tar.bz2 | |
attempt at fixing the examples
Diffstat (limited to 'djangorestframework/mixins.py')
| -rw-r--r-- | djangorestframework/mixins.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py index 516a0f4b..43dce870 100644 --- a/djangorestframework/mixins.py +++ b/djangorestframework/mixins.py @@ -372,7 +372,7 @@ class ReadModelMixin(ModelMixin): except model.DoesNotExist: raise ImmediateResponse(status=status.HTTP_404_NOT_FOUND) - return self.model_instance + return Response(self.model_instance) class CreateModelMixin(ModelMixin): @@ -428,7 +428,7 @@ class UpdateModelMixin(ModelMixin): # TODO: update on the url of a non-existing resource url doesn't work # correctly at the moment - will end up with a new url try: - self.model_instance = self.get_instance(*query_kwargs) + self.model_instance = self.get_instance(**query_kwargs) for (key, val) in self.CONTENT.items(): setattr(self.model_instance, key, val) |
