I have sqlite database setting like in my production server :
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
I have also tried chown www-data path_to_db
and chmod 777 path_to_db
I am using celery, rabbitmq and supervisor in this application.. but its still showing error saying unable to open database.. whats the issue here
这为我工作:
chown www-data path_to_directory_containing_db
First lets find out the value of BASE_DIR. Add to your settings.py
print "base dir %s" % BASE_DIR
And run server. You'll see your base_dir and could ensure that file is in right place.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.