aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2014-01-14 20:35:09 +0000
committerTom Christie2014-01-14 20:35:09 +0000
commitdde3b1dfcb5490712ee462fcf360395da0b5d4fd (patch)
tree1a25b68babd0ce6a14fd26fd8dde352294f1720c /rest_framework/mixins.py
parentd20c49da4ae6f569d3acc243169e3c13c89a95fe (diff)
downloaddjango-rest-framework-dde3b1dfcb5490712ee462fcf360395da0b5d4fd.tar.bz2
Use api_settings.URL_FIELD_NAME
Diffstat (limited to 'rest_framework/mixins.py')
-rw-r--r--rest_framework/mixins.py3
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 {}