I have customized the save() method of my Django model to write some data into a file. I want to write the data into a file in STATIC_ROOT so nginx can serve it. When I write data into a file inside Django project root everything is OK but when I try to write to STATIC_ROOT I get "Database is locked error".
What is the problem with that?
I found the solution to this problem but I didn't get why this happens!
To solve the problem when I was overriding the save method of Django model, I first called the save method of parent model and then saved my file! Do in reverse order caused the error.
Django sqlite "Database is locked" when writing to STATIC_ROOT