Forums

Problem with Sqlite3 on deployment

Hi! I am beginner so sorry for the dumb question. I made a new project on my local and if I deploy it to Pythonanywhere it need to be stashed and it always overwrites the db with the local's db on Pythonanywhere. I have a .gitignore in my root with these data:

*.log
*.pot
*.pyc
__pycache__/
local_settings.py
db.sqlite3
db.sqlite3-journal
 media

What am I doing wrong? Thank you in advance.

If you have already committed the database file to the repo before adding the .gitignore, the entry will still be in the repo. You can use git rm to remove the file from the repo. Be careful, that may also delete the file on the disk, so make sure you have a copy outside of the repo that you can copy back after the git rm

Thank you glenn, it works well now :)

Thanks for letting us know!