diff --git a/djangoldp/views.py b/djangoldp/views.py index 0aac9e24a969c01759e129a1ea136a6a0421c290..f4b2fb59f72c56b898174c6329c7b8f8ee606393 100644 --- a/djangoldp/views.py +++ b/djangoldp/views.py @@ -138,6 +138,9 @@ class LDPViewSet(LDPViewSetGenerator): response["Access-Control-Allow-Headers"] = "Content-Type, if-match" response["Access-Control-Allow-Credentials"] = 'true' response["Accept-Post"] = "application/ld+json" + if response.status_code == 201 and '@id' in response.data: + response["Location"] = response.data['@id'] + response["Accept-Post"] = "application/ld+json" return response def update(self, request, *args, **kwargs):