Nasty Config Issue for Django and SQLite 3

Was getting the following errors (alternately, depending on permissions settings):

  • “Unable to Open Database File”
  • “Unable to Write to Database File”

Found a lot of SQLite users complaining about this, then finally got the tip from this page that I needed to set my permissions on the parent director to writeable by the Apache user too.  What a pain.Another note: One nice thing that alleviates some of the normal irritation when moving between dev environments and production is the following code I added into the file:

import os.pathPROJECT_DIR = os.path.dirname(__file__)DATABASE_NAME = os.path.join(PROJECT_DIR, "database.db")


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s