Django database connection error: "sqlite3.OperationalError: unable to open database file"
So I just created a new project and app for the blog. When开发者_开发技巧 I try and syncdb it says: "sqlite3.OperationalError: unable to open database file"
I saw the noob FAQ and it says the possible errors are having an incorrect path or not giving apache permission to write to the folder.
Here is a dpaste with my settings.py and some terminal outputs to give you an idea of what's up.
http://dpaste.org/eQUm/
If the solution is to give apache permission to write, how would i do it? I am running the server on a personal computer on ubuntu.
You need to give the path to the database file, look at your database settings:
'NAME': '/home/vmplanet/code/blog', # Or path to database file if using sqlite3.
...which is presumably the project directory. Try /home/vmplanet/code/blog/blog.db
.
精彩评论