mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Add the csrf token to window.drf
In the same manner as the current version of base.html from DRF. This is part 2 of the removal of base.html.
This commit is contained in:
parent
34d76422d6
commit
ba4ad191fc
@ -274,7 +274,7 @@
|
||||
<script>
|
||||
window.drf = {
|
||||
csrfHeaderName: "{{ csrf_header_name|default:'X-CSRFToken' }}",
|
||||
csrfCookieName: "{{ csrf_cookie_name|default:'csrftoken' }}"
|
||||
csrfToken: "{% if request %}{{ csrf_token }}{% endif %}"
|
||||
};
|
||||
</script>
|
||||
<script src="{% static "rest_framework/js/jquery-1.12.4.min.js" %}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user