Skip to content

Commit

Permalink
updates to packages
Browse files Browse the repository at this point in the history
  • Loading branch information
stuchalk committed Jul 23, 2024
1 parent 678f926 commit 592c1b3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 8 additions & 7 deletions constants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 0 additions & 2 deletions static/repsys_4.html
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,4 @@ <H2 ALIGN=CENTER><A NAME="license">Copyright &#169; 2003, 2006, 2008, 2009, 2010
<TD ALIGN=RIGHT><A HREF="http://people.csail.mit.edu/jaffer/">Go Figure!</A></TD>
</TR>
</TABLE>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
<script type="text/javascript"> _uacct = "UA-3791005-1"; urchinTracker(); </script>
</BODY>
3 changes: 2 additions & 1 deletion templates/units/crosswalk.html
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand All @@ -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() {
Expand Down

0 comments on commit 592c1b3

Please sign in to comment.