Skip to content

Commit

Permalink
A minor update (and a mandatory version bump) to fix the broken backw…
Browse files Browse the repository at this point in the history
…ard compatibility of Django v1.7. I thank Bernd from Amsterdam for pointing it out and helping me fix it.
  • Loading branch information
meren committed Sep 9, 2014
1 parent 45abdc6 commit c851ea9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ A simple change log file to keep track on what is new.
Versions
========

* 1.3
* A minor update to fix the broken backward compatibility of Django v1.7. I thank Bernd from Amsterdam for pointing it out.

* 1.2
* Bug in MANIFEST file is fixed.
* Bug related to --quick flag (which resulted in under-estimaded benchmark scores) is fixed.
Expand Down
16 changes: 11 additions & 5 deletions Oligotyping/utils/html/for_decomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,18 @@


try:
from django.template.loader import render_to_string
from django.conf import settings
absolute = os.path.join(os.path.dirname(os.path.realpath(__file__)))
settings.configure(DEBUG=True, TEMPLATE_DEBUG=True, DEFAULT_CHARSET='utf-8', TEMPLATE_DIRS = (os.path.join(absolute, 'templates'),))

try:
import django
django.setup()
except:
pass

from django.template.loader import get_template
from django.template.loader import render_to_string
from django.template.defaultfilters import register
except ImportError:
raise HTMLError, 'You need to have Django module (http://djangoproject.com) installed on your system to generate HTML output.'
Expand Down Expand Up @@ -134,10 +144,6 @@ def sumvals(arg, clean = None):
def mklist(arg):
return range(0, int(arg))

absolute = os.path.join(os.path.dirname(os.path.realpath(__file__)))
settings.configure(DEBUG=True, TEMPLATE_DEBUG=True, DEFAULT_CHARSET='utf-8', TEMPLATE_DIRS = (os.path.join(absolute, 'templates'),))

from django.template.loader import get_template
t = get_template('index_for_decomposition.tmpl')

def generate_html_output(run_info_dict, html_output_directory = None):
Expand Down
16 changes: 11 additions & 5 deletions Oligotyping/utils/html/for_oligotyping.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@


try:
from django.template.loader import render_to_string
from django.conf import settings
absolute = os.path.join(os.path.dirname(os.path.realpath(__file__)))
settings.configure(DEBUG=True, TEMPLATE_DEBUG=True, DEFAULT_CHARSET='utf-8', TEMPLATE_DIRS = (os.path.join(absolute, 'templates'),))

try:
import django
django.setup()
except:
pass

from django.template.loader import get_template
from django.template.loader import render_to_string
from django.template.defaultfilters import register
except ImportError:
raise HTMLError, 'You need to have Django module (http://djangoproject.com) installed on your system to generate HTML output.'
Expand Down Expand Up @@ -150,10 +160,6 @@ def sumvals(arg, clean = None):
def mklist(arg):
return range(0, int(arg))

absolute = os.path.join(os.path.dirname(os.path.realpath(__file__)))
settings.configure(DEBUG=True, TEMPLATE_DEBUG=True, DEFAULT_CHARSET='utf-8', TEMPLATE_DIRS = (os.path.join(absolute, 'templates'),))

from django.template.loader import get_template
t = get_template('index_for_oligo.tmpl')

def generate_html_output(run_info_dict, html_output_directory = None, entropy_figure = None):
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2
1.3

0 comments on commit c851ea9

Please sign in to comment.