i have an add_form under my django app. i want to add a feature this form which is saving form automatically after user starts to type.

like in gmail , or blogger.

what are the steps i should follow? which way or plugin? and how to use them?

any knowlenge can help me.thank you.

有帮助吗?

解决方案

There's two useful jquery plugins to get you started

https://github.com/BenGriffiths/jquery-save-as-you-type which saves what you type locally to a cookie client-side. Using this plugin is simpler and you will only need to actually save into your django backend when the user hits your form's "save" button.

and

https://github.com/nervetattoo/jquery-autosave which requires that you set up an intermediary model (perhaps a Draft model) in django to keep track of updates along the way. And when the user finally hits save, a final copy of the data is then saved into the actual model.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top