Django Admin change_form.html에 버튼 추가 및 저장시 custom 작업 수행
{% block submit_buttons_bottom %} {{ block.super }} {% endblock %} def response_change(self, request, obj): if "_gotoTrainedBoxes" in request.POST or "_gotoTrainedBoxes(include Image)" in request.POST : if "_gotoTrainedBoxes(include Image)" in request.POST : Trained_Image.createImageData(obj) opts = self.model._meta msg = format_html('The Trained_Image “{}” was changed successfully.', obj.id) se..
2021.02.12