diff options
| author | Tom Christie | 2014-01-14 20:35:09 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-01-14 20:35:09 +0000 | 
| commit | dde3b1dfcb5490712ee462fcf360395da0b5d4fd (patch) | |
| tree | 1a25b68babd0ce6a14fd26fd8dde352294f1720c /rest_framework/mixins.py | |
| parent | d20c49da4ae6f569d3acc243169e3c13c89a95fe (diff) | |
| download | django-rest-framework-dde3b1dfcb5490712ee462fcf360395da0b5d4fd.tar.bz2 | |
Use api_settings.URL_FIELD_NAME
Diffstat (limited to 'rest_framework/mixins.py')
| -rw-r--r-- | rest_framework/mixins.py | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py index 43950c4b..5fbcf700 100644 --- a/rest_framework/mixins.py +++ b/rest_framework/mixins.py @@ -11,6 +11,7 @@ from django.http import Http404  from rest_framework import status  from rest_framework.response import Response  from rest_framework.request import clone_request +from rest_framework.settings import api_settings  import warnings @@ -60,7 +61,7 @@ class CreateModelMixin(object):      def get_success_headers(self, data):          try: -            return {'Location': data['url']} +            return {'Location': data[api_settings.URL_FIELD_NAME]}          except (TypeError, KeyError):              return {} | 
