mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 11:00:13 +03:00
fix error when rendering with no context
This commit is contained in:
parent
09f8ac241d
commit
b98d9ef0f6
|
@ -286,7 +286,7 @@
|
|||
<script>
|
||||
window.drf = {
|
||||
csrfHeaderName: "{{ csrf_header_name|default:'X-CSRFToken' }}",
|
||||
csrfToken: "{{ csrf_token }}"
|
||||
csrfToken: "{% if request %}{{ csrf_token }}{% endif %}"
|
||||
};
|
||||
</script>
|
||||
<script src="{% static "rest_framework/js/jquery-3.3.1.min.js" %}"></script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user