[extensions-web] urls: Make the dummy extension-data view return a valid HttpResponse object
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] urls: Make the dummy extension-data view return a valid HttpResponse object
- Date: Thu, 29 Mar 2012 21:48:58 +0000 (UTC)
commit efc4008842210180d1351147e6dead261741417f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Mar 29 16:18:57 2012 -0400
urls: Make the dummy extension-data view return a valid HttpResponse object
This is required to test the download handler while in DEBUG=False mode.
sweettooth/urls.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/urls.py b/sweettooth/urls.py
index 9825226..e60b433 100644
--- a/sweettooth/urls.py
+++ b/sweettooth/urls.py
@@ -3,6 +3,7 @@ import os.path
from django.conf.urls.defaults import patterns, include, url, handler404, handler500
from django.conf import settings
+from django.http import HttpResponse
from django.contrib import admin
from django.views import static
@@ -28,7 +29,7 @@ if settings.DEBUG:
dict(document_root=settings.MEDIA_ROOT), name='extension-data'))
else:
# and a dummy to reverse on for production.
- urlpatterns.append(url(r'^static/extension-data/(?P<path>.*)', lambda n: None,
+ urlpatterns.append(url(r'^static/extension-data/(?P<path>.*)', lambda *a, **kw: HttpResponse(),
name='extension-data'))
if settings.DEBUG:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]