hey, I want to add some more functionality to the admin in the change_form
so I created a file templates\admin\product\change_form.html
:
{% extends "admin/change_form.html" %}
{% load i18n admin_urls %}
{% block field_sets %}
{% for fieldset in adminform %}
{% include "admin/includes/fieldset.html" %}
{% endfor %}
<h1> hey </h1>
{{ request }}
<script>
console.log(request)
</script>
{% endblock %}
and I do see I something added to the HTML and I can’t access it from the javascript:
my question is:
what information can I get from what Django already retrieve, like the name of the product and so on?
what is the recommended way to implement my own js file in the admin change_form
?
and why I can not access request
from my javascript?
Thank you!