Can't create sqlite database on Windows XP with Django Python 2.7
Question: I need to create an SQLite database with Django and Python 2.7.

However, when I run "python manage.py syncdb", I receive:

    
    
    unable to open database file
    

Here is a fragment of settings.py file:

    
    
    import os
    
    MANAGERS = ADMINS
    PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
    DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',     
        'NAME': os.path.join(PROJECT_DIR, 'db'),....
    

I have read several books and tutorials, but can't make a database on Windows.


Answer: change 'NAME': os.path.join(PROJECT_DIR, 'db'), to 'NAME': 'database.db',

