Search code examples
pythondjangodjango-admin

Django admin auto-save


I was asking myself how it would be possible to auto-save one of my models field I'm currently updating in the django admin every x seconds. For example, if I'm writing a blog post, I'd like it to be auto-saved every x seconds. That way, if I ever stupidly close the tab, I wouldn't lose all my work.

Any ideas on how to achieve this? Or any modules I wouldn't have found while my search?


Solution

  • As HTTP is stateless, you have to use JavaScript for this task and submit the actual changes, nowadays it is called Ajax ;-)

    Maybe you like Dajax