upload/views.py
changeset 3 eb11f0116216
parent 2 4d2bbb2f3c4e
child 12 0a2b4e85a4ab
--- a/upload/views.py	Wed Sep 02 19:34:48 2009 +0530
+++ b/upload/views.py	Wed Sep 02 19:43:43 2009 +0530
@@ -32,21 +32,3 @@
 		})
     return render_to_response(template_name,
 			context_instance = c)
-
-#to create the dump of content shown in text box and then making it downloadable
-def file_archive(request):
-	if request.method == 'POST':
-		form = Uploaded_fileForm(request.POST, request.FILES)
-		if form.is_valid():
-			response = HttpResponse(mimetype='application/tar')
-    			response['Content-Disposition'] = 'attachment; filename=content.tar'
-			content = open('download.txt','w')
-			content.write(form.cleaned_data['content'])
-			content.close()
-			tar = tarfile.open('download.tar','w')
-			tar.add('download.txt')
-			tar.close()
-			response.write(open('download.tar').read())
-			return response
-	return HttpResponseRedirect('/ocr/')
-