You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
908 B
33 lines
908 B
{% extends 'partials/base.html' %}
|
|
{% block content %}
|
|
<h1>Test page </h1>
|
|
{% endblock %}
|
|
{% block js_block %}
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
|
|
$.ajax({
|
|
url: '/api/stages/4/',
|
|
type: 'PUT',
|
|
beforeSend: function (xhr) {
|
|
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'))
|
|
},
|
|
|
|
data: {
|
|
name: 'Test name.HA HA HA nnnnnn ',
|
|
cost: 100,
|
|
result: 'Результат',
|
|
order: 1,
|
|
},
|
|
dataType: 'json',
|
|
success: function (json) {
|
|
console.log(json);
|
|
},
|
|
error: function(e){
|
|
console.log(e);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|