From b33579a7a18c2cbc6e3789d4a7dc78c82fb0fe80 Mon Sep 17 00:00:00 2001 From: Sébastien Piquemal Date: Fri, 10 Feb 2012 11:05:20 +0200 Subject: attempt at fixing the examples --- examples/pygments_api/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/pygments_api') diff --git a/examples/pygments_api/views.py b/examples/pygments_api/views.py index 44dd2caa..d59a52c0 100644 --- a/examples/pygments_api/views.py +++ b/examples/pygments_api/views.py @@ -81,7 +81,8 @@ class PygmentsRoot(View): remove_oldest_files(HIGHLIGHTED_CODE_DIR, MAX_FILES) - return Response(status.HTTP_201_CREATED, headers={'Location': reverse('pygments-instance', args=[unique_id])}) + self.headers['Location'] = reverse('pygments-instance', args=[unique_id]) + return Response(status.HTTP_201_CREATED) class PygmentsInstance(View): -- cgit v1.2.3