stuff working

This commit is contained in:
vabene1111
2018-02-05 21:12:29 +01:00
parent df576a20ba
commit eea37b9af5
10 changed files with 317 additions and 135 deletions

View File

@@ -29,4 +29,22 @@
</div>
{% endif %}
<script type="text/javascript">
function openRecipe(id) {
url = "{% url 'get_file_link' recipe_id=12345 %}".replace(/12345/, id);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200) {
console.log(this.response);
window.open(this.responseText, '_blank');
}
};
xhttp.open("GET", url, true);
xhttp.send();
}
</script>
{% endblock %}