admin.py file ### i am no sure how to do
i am sending object (osm_data) on html page order_final.html every thing working in render but i want update some field from order_final.html page *change_form_template = 'admin/appname/userorders/order_final.html'* def get_osm_info(self): pass def change_view(self,request, object_id, extra_context=None,*args,**kwargs): extra_context = extra_context or {} extra_context['osm_data'] = UserOrders.objects.filter(pk=object_id).values('orderedproduct__quantity', 'orderedproduct__price', 'order_id', 'payment_method', 'order_date', 'order_price', 'status', 'orderedproduct__original_price', 'orderedproduct__lead_time', 'shipping_term_code', 'dispatched_date','buyer_individual__first_name','buyer_individual__last_name', 'expected_delivery_date', 'escrow_status', 'updated_by', 'delivery_declaration_slip', 'po_reference_number', ) extra_context['osm_data1'] = UserOrdersStateChange.objects.filter(order_id =object_id).values('changed_state','changed_at','order_id') return super(UserOrdersAdmin, self).render_change_form(request,extra_context) ####admin custom html ######## <div class="modal-body"> <form action="/appname/userorders/{{i.order_id}}/change/" method="POST"> <div class="form-group"> <label for="recipient-name" class="form-control-label">Recipient:</label> <input type="text" class="form-control" id="recipient-name" name="name"> </div> <div class="form-group"> <label for="message-text" class="form-control-label">Message:</label> <textarea class="form-control" id="message-text"></textarea> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <input type="submit" class="btn btn-primary">Send message</input> </div> </div> </div> </div> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/515abf6a-fa7d-46d6-9835-6de373b9ef91%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.