import logging

from google.appengine.ext import webapp

from isimplebin_utils import *

class Download(webapp.RequestHandler):
    def get(self, paste_id):                
        paste = model.get_original(paste_id)
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.headers['Content-Disposition'] =  'attachment; filename=' + paste_id + '.txt'
        self.response.out.write(paste.content)