mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
Refs #20910 -- Replaced snippet directive with code-block.
This commit is contained in:
parent
f8ff529ee3
commit
c49ea6f591
32 changed files with 234 additions and 375 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue