mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #20910 -- Replaced snippet directive with code-block.
This commit is contained in:
committed by
Tim Graham
parent
f8ff529ee3
commit
c49ea6f591
@@ -31,8 +31,8 @@ In your custom ``change_form.html`` template, extend the
|
||||
<script type="text/javascript" src="{% static 'app/formset_handlers.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
.. snippet:: javascript
|
||||
:filename: app/static/app/formset_handlers.js
|
||||
.. code-block:: javascript
|
||||
:caption: app/static/app/formset_handlers.js
|
||||
|
||||
(function($) {
|
||||
$(document).on('formset:added', function(event, $row, formsetName) {
|
||||
@@ -69,8 +69,8 @@ namespace, just listen to the event triggered from there. For example:
|
||||
<script type="text/javascript" src="{% static 'app/unregistered_handlers.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
.. snippet:: javascript
|
||||
:filename: app/static/app/unregistered_handlers.js
|
||||
.. code-block:: javascript
|
||||
:caption: app/static/app/unregistered_handlers.js
|
||||
|
||||
django.jQuery(document).on('formset:added', function(event, $row, formsetName) {
|
||||
// Row added
|
||||
|
||||
Reference in New Issue
Block a user