from cendr import app
from flask import make_response
from cendr.models import strain, report
from collections import OrderedDict
from flask import render_template


@app.route('/data/')
def data_page():
    bcs = OrderedDict([("data", None)])
    title = "Data"
    from cendr import build
    strain_listing = strain.select().filter(
        strain.isotype != None).order_by(strain.isotype).execute()
    return render_template('data.html', **locals())


@app.route('/data/download/<filetype>.sh')
def download_script(filetype):
    strain_listing = strain.select().filter(
        strain.isotype != None).order_by(strain.isotype).execute()
    download_page = render_template('download_script.sh', **locals())
    response = make_response(download_page)
    response.headers["Content-Type"] = "text/plain"
    return response


@app.route("/data/browser/")
def browser():
    bcs = OrderedDict([("data", "/data"), ("Browser", None)])
    title = "Browser"
    from cendr import build
    return render_template('browser.html', **locals())
@@ -839,38 +839,135 @@
 ute(
-%22/data/browser/%22)%0Adef browser(
+'/data/browser/')%0A@app.route('/data/browser/%3Cchrom%3E/%3Cstart%3E/%3Cend%3E')%0Adef browser(chrom = %22III%22, start = 11746923, end = 11750250
 ):%0A 

edit data