diff --git a/Pipfile b/Pipfile index ff1c177..6e2b993 100644 --- a/Pipfile +++ b/Pipfile @@ -7,12 +7,12 @@ name = "pypi" attrs = ">=23.2.0" bs4 = ">=0.0.2" charset-normalizer = ">=3.3.0" -django = ">=5.0.0" -GTC = ">=1.5.0" +django = ">=5.0.7" +GTC = ">=1.5.1" gunicorn = ">=22.0.0" html5 = ">=0.0.9" html5lib = ">=1.1" -numpy = ">=1.26.0" +numpy = ">=2.0.0" owlready2 = ">=0.46" pnglatex = ">=1.1" pip-tools = ">=7.4.0" diff --git a/constants/views.py b/constants/views.py index e6e98b9..fbd8904 100644 --- a/constants/views.py +++ b/constants/views.py @@ -72,10 +72,11 @@ def alldata(request, cnid): # TODO: create image file from latex string on the fly -def symbol(request, cnid): - sym = Constants.objects.filter(id=cnid).values('symbol')[0] - latex = sym['symbol'].replace('$', '') - ipath = STATIC_URL + 'symbols/constant' + cnid + '.png' - pnglatex(r"[" + latex + "]", ipath) - image_data = open(ipath, "rb").read() - return HttpResponse(image_data, mimetype="image/png") +# TODO: this is a secrutoy risk as is +# def symbol(request, cnid): +# sym = Constants.objects.filter(id=cnid).values('symbol')[0] +# latex = sym['symbol'].replace('$', '') +# ipath = STATIC_URL + 'symbols/constant' + cnid + '.png' +# pnglatex(r"[" + latex + "]", ipath) +# image_data = open(ipath, "rb").read() +# return HttpResponse(image_data, mimetype="image/png") diff --git a/static/repsys_4.html b/static/repsys_4.html index 50fa7eb..c03377a 100644 --- a/static/repsys_4.html +++ b/static/repsys_4.html @@ -872,6 +872,4 @@

Copyright © 2003, 2006, 2008, 2009, 2010 Go Figure! - - diff --git a/templates/units/crosswalk.html b/templates/units/crosswalk.html index 2eaf22b..c65bfdb 100644 --- a/templates/units/crosswalk.html +++ b/templates/units/crosswalk.html @@ -40,6 +40,7 @@ data: { csrfmiddlewaretoken: '{{ csrf_token }}' }, success: function (data) { let units = JSON.parse(data); + let form = $('#crossform'); // send data to database if (units==='error') { alert('Hmm, something went wrong :(');return false; } @@ -56,7 +57,7 @@ tbody.append(trow); }); // update form action url - $('#crossform').attr('action', "/units/crosswalk/" + sid1 + "/" + sid2); + $.find(form).attr('action', "/units/crosswalk/" + sid1 + "/" + sid2); $("#getcw").show(); }, error: function() {