sqlite - Django on OpenShift: "no such table" -


i kind of error when try load page.

running sqlall throw ssh shows database shema fine.

i have such settings file:

if on_openshift:     # os.environ['openshift_mysql_db_*'] variables can used databases created     # rhc cartridge add (see /readme in git repo)     databases = {         'default': {             'engine': 'django.db.backends.sqlite3',  # add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.             'name': os.path.join(os.environ['openshift_data_dir'], 'sqlite3.db'),  # or path database file if using sqlite3.             'user': '',                      # not used sqlite3.             'password': '',                  # not used sqlite3.             'host': '',                      # set empty string localhost. not used sqlite3.             'port': '',                      # set empty string default. not used sqlite3.         }     } else:     databases = {         'default': {             'engine': 'django.db.backends.sqlite3',  # add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.             'name': os.path.join(project_dir, 'sqlite3.db'),  # or path database file if using sqlite3.             'user': '',                      # not used sqlite3.             'password': '',                  # not used sqlite3.             'host': '',                      # set empty string localhost. not used sqlite3.             'port': '',                      # set empty string default. not used sqlite3.         }     } 

and have copy of database in /data directory.

also, have such startup hooks:

source $openshift_homedir/$cartridge_type/virtenv/bin/activate  if [ ! -f $openshift_data_dir/sqlite3.db ]     echo "copying $openshift_repo_dir/wsgi/openshift/sqlite3.db $openshift_data_dir"     cp "$openshift_repo_dir"wsgi/openshift/sqlite3.db $openshift_data_dir     python "$openshift_repo_dir".openshift/action_hooks/secure_db.py | tee ${openshift_data_dir}/credentials else     echo "executing 'python $openshift_repo_dir/wsgi/openshift/manage.py syncdb --noinput'"     python "$openshift_repo_dir"wsgi/openshift/manage.py syncdb --noinput fi  echo "executing 'python $openshift_repo_dir/wsgi/openshift/manage.py collectstatic --noinput'" python "$openshift_repo_dir"wsgi/openshift/manage.py collectstatic --noinput 

so seems fine.

(however, seems me startup hooks havn't been started.)

edit : don't know why, after manual coping of database /data - works fine!

are using quickstart or building these out? things check ensure hooks added executable (chmod +x). echo statements should show in git push logs/output that's when these build/deploy hooks executed.
glad things working now.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -