<script type="text/javascript">
    /* <![CDATA[ */
        $(document).ready(function() {
            $.ajax({
                    type: 'POST',
                    url: '{{ url }}',
                    data: {object_pk: '{{ object_pk }}', ctype_pk: '{{ ctype_pk }}', csrfmiddlewaretoken: '{{ csrf_token }}'},
                    dataType: 'json'}).always(
                        {% if client_callbacks %}
                            function (data, textStatus, jqXHR) {
                                {% for client_callback in client_callbacks %}
                                    try {
                                        {{ client_callback }}(data, jqXHR);
                                    } catch (e) {
                                        // {{ client_callback }} was not callable
                                        //console.log('{{ client_callback }} was not callable');
                                    }

                                {% endfor %}
                            }
                        {% endif %}
                    );
        });
    /* ]]> */
</script>