Django book question: Database config problem. Getting Operational Error
Question: I am on chapter 5 of the django book and trying to proceed, but I'm stuck on
one part:

Link to exact chapter: <http://www.djangobook.com/en/2.0/chapter05/>

Problem: testing database configurations

When I:

  1. Run python manage.py shell form within the mysite project directory 
  2. Then in the shell type these commands to test database configuration

    
    
    from django.db import connection  
    cursor = connection.cursor()
    

I get the following error when i do all of the above:

> "OperationalError: unable to open database file"

Was I supposed to create some sort of file within the new directory or folder
i created called "MyDB". If so, how do I do this?

Below is how my DB configurations are set:

Configurations:

    
    
    DATABASES = {
    
        'default': {
            'ENGINE': 'sqlite3',             
            'NAME':   'C:/Python27/MyDB',      
            'USER': '',                      
            'PASSWORD': '',                 
            'HOST': '',                      
            'PORT': '',                     
        }
    


Answer: My first guess is permissions error. What are the permissions on the Python27
directory, and do they correspond to the permissions from which you are
running the python manage command.

I typically put the database in the project directory, not the python
directory.

