I’ve got python installed and sqlite is included with it… but where is the sqlite db file path that was created with manage.py syncdb? I’m on a mac.
I’ve got python installed and sqlite is included with it… but where is the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the
settings.pyfile, there is a variable calledDATABASES. It is a dict, and one of its keys isdefault, which maps to another dict. This sub-dict has a key,NAME, which has the path of the SQLite database.This is an example of a project of mine:
You can easily retrieve this value using the Django shell that is accessible running the command
python manage.py shell. Just follow the steps below:If the returned value is some relative path, just use
os.path.abspathto find the absolute one: