[extensions-web] review: Add a way to get a raw file
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] review: Add a way to get a raw file
- Date: Sat, 14 Jul 2012 11:43:33 +0000 (UTC)
commit c5b9a24bd596ddd6428904622cdc010687bcd012
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Jul 14 07:43:25 2012 -0400
review: Add a way to get a raw file
sweettooth/review/views.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 3cf2b7a..67b684f 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -209,7 +209,10 @@ def ajax_get_file_view(request, obj):
raise Http404()
raw = f.read()
- return html_for_file(filename, raw)
+ if request.GET.get('raw', False):
+ return raw
+ else:
+ return html_for_file(filename, raw)
def download_zipfile(request, pk):
version = get_object_or_404(models.ExtensionVersion, pk=pk)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]