diff options
| author | Tom Christie | 2011-12-09 04:40:14 -0800 |
|---|---|---|
| committer | Tom Christie | 2011-12-09 04:40:14 -0800 |
| commit | 325ee1e3a459aa33c045d6574d48a40e403b3e92 (patch) | |
| tree | 4bed79b9cd39b517224c6bbb2b962ddcc537272f /djangorestframework/mixins.py | |
| parent | 20f8956c8f92f2a6fe812bce80f4ecc188450cf1 (diff) | |
| parent | 3b413dbb40128fb3e3b62a5359b2bd2968d626d8 (diff) | |
| download | django-rest-framework-325ee1e3a459aa33c045d6574d48a40e403b3e92.tar.bz2 | |
Merge pull request #62 from txels/master
HTTP OPTIONS support
Diffstat (limited to 'djangorestframework/mixins.py')
| -rw-r--r-- | djangorestframework/mixins.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py index 9fed6122..394440d3 100644 --- a/djangorestframework/mixins.py +++ b/djangorestframework/mixins.py @@ -451,7 +451,10 @@ class ResourceMixin(object): return self._resource.filter_response(obj) def get_bound_form(self, content=None, method=None): - return self._resource.get_bound_form(content, method=method) + if hasattr(self._resource, 'get_bound_form'): + return self._resource.get_bound_form(content, method=method) + else: + return None @@ -565,7 +568,7 @@ class UpdateModelMixin(object): # 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: if args: - # If we have any none kwargs then assume the last represents the primrary key + # If we have any none kwargs then assume the last represents the primary key self.model_instance = model.objects.get(pk=args[-1], **kwargs) else: # Otherwise assume the kwargs uniquely identify the model |
