javascript - How to send Button action value to database using Django Form? -


i have model named ordermodel , order_status field on model. although have other fields in model.but want update field.

order_status = models.charfield(max_length=50, default='request_send')

then model form

class orderstatusupdateform(forms.modelform):      class meta:          model = models.ordermodel          fields = ('order_status',)      

my plan that,initially receive value 'request_send' , time send notification user update field. user receive form 2 option accept , decline (better if button)

so, when click on accept or decline button order_status field update accept or decline value.

could suggest me how can or other way ? javascript or idea accepted. !


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -