Permalink
Browse files

This commit moves the image generation dir *outside*

the git repository.
  • Loading branch information...
pjotrp committed Feb 25, 2016
1 parent 178ef44 commit f8a0a20d9cc57ba0a27ef6fd53db65ec9727d26a
@@ -63,22 +63,19 @@
TMPDIR = mk_dir(TEMPDIR+'/gn2/')
CACHEDIR = mk_dir(TEMPDIR+'/cache/')
GENERATED_IMAGE_DIR = TMPDIR # note we can not write into the git tree
GENERATED_IMAGE_DIR = mk_dir(TMPDIR+'/generate/') # we can no longer write into the git tree
GENODIR = flat_files('genotype')+'/'
JSON_GENODIR = assert_dir(GENODIR+'json/')
# GENO_ARCHIVE_DIR = GENODIR + 'archive/'
# TEXTDIR = HTMLPATH + 'ProbeSetFreeze_DataMatrix/'
# CMDLINEDIR = HTMLPATH + 'webqtl/cmdLine/'
# ChangableHtmlPath = GNROOT + 'web/'
# SITENAME = 'GN'
# PORTADDR = "http://50.16.251.170"
# BASEHREF = '<base href="http://50.16.251.170/">'
INFOPAGEHREF = '/dbdoc/%s.html'
# GLOSSARYFILE = "/glossary.html"
CGIDIR = '/webqtl/' #XZ: The variable name 'CGIDIR' should be changed to 'PYTHONDIR'
SCRIPTFILE = 'main.py'
# GLOSSARYFILE = "/glossary.html"
# REFRESHSTR = '<meta http-equiv="refresh" content="5;url=%s' + SCRIPTFILE +'?sid=%s">'
# REFRESHDIR = '%s' + SCRIPTFILE +'?sid=%s'
@@ -29,8 +29,6 @@
import string
from math import *
import piddle as pid
# import piddlePIL as pil
# from piddle import Font
import sys,os
import cPickle
import httplib, urllib
@@ -42,18 +40,7 @@
from utility import helper_functions
from utility import Plot
from base import webqtlConfig
#from intervalAnalyst import GeneUtil
#from base.webqtlTrait import webqtlTrait
#from base.templatePage import templatePage
from utility import webqtlUtil
#from utility.THCell import THCell
#from utility.TDCell import TDCell
#from dbFunction import webqtlDatabaseFunction
#from base.GeneralObject import GeneralObject
#import logging
#logging.basicConfig(filename="/tmp/gn_leiyan.log", level=logging.INFO)
#_log = logging.getLogger("gn\web\webqtl\intervalMapping\IntervalMappingPage.py")
#########################################
# Inteval Mapping Plot Page
@@ -30,7 +30,7 @@
<div id="chart_container">
<div class="qtlcharts" id="topchart">
{{ gifmap|safe }}
<img src="/static/output/{{ filename }}.jpeg" usemap="#WebQTLImageMap">
<img src="/generated/{{ filename }}.jpeg" usemap="#WebQTLImageMap">
</div>
</div>
</form>
View
@@ -30,7 +30,7 @@
from wqflask import app
from flask import (render_template, request, make_response, Response,
Flask, g, config, jsonify, redirect, url_for)
Flask, g, config, jsonify, redirect, url_for, send_from_directory)
from wqflask import search_results
from wqflask import gsearch
@@ -53,6 +53,7 @@
from utility.tools import TEMPDIR
from base import webqtlFormData
from base.webqtlConfig import GENERATED_IMAGE_DIR
from utility.benchmark import Bench
from pprint import pformat as pf
@@ -173,6 +174,10 @@ def docedit():
doc = docs.Docs(request.args['entry'])
return render_template("docedit.html", **doc.__dict__)
@app.route('/generated/<filename>')
def generated_file(filename):
return send_from_directory(GENERATED_IMAGE_DIR,filename)
@app.route("/help")
def help():
doc = docs.Docs("help")

0 comments on commit f8a0a20

Please sign in to comment.