V
V
Vladimir Kuts2017-04-05 17:49:11
Django
Vladimir Kuts, 2017-04-05 17:49:11

Partial integration of angular and django admin?

There is a django admin panel. I connect the angularjs module to it, and write a custom widget

<div class="id_footnotes" style="display: block;height: 100%;float: left;">
    <div class="footnote_blk">
        <div ng-repeat="field in footn_fields">
            <input type="text" ng-model="footn_fields[$index]" ng-model-options="{updateOn: 'blur'}" />
        </div>
        <div ng-click="addFootnote();" style="cursor: pointer;">
                <img src="/static/admin/img/icon-addlink.svg" alt="Добавить">
        </div>
        <input type="hidden" id="id_footnotes" name="footnotes" ng-model="my_field.data"/>
    </div>
</div>

This widget is successfully added to the input fields in the admin panel, and by design, after editing, the modified $scope.my_field.data object should fly away when submitting the form along with other fields in the "footnotes" field. However, this field leaves empty.
How can I pour the necessary data from the angular model into the admin panel?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question