I want to add a survey through postgres, but it is not displayed in the kobo
Edit the following tables:
-viewer_parsedinstance
-reversion_version
-reversiom_revision
-logger_instance
What table do I need to insert for it to be displayed on my kobo server?
Hi @Roger963, you might need to sync Postgres with Mongo as thatβs what Django is querying. In the kobocat
container you can run ./manage.py sync_mongo --remongo [username] [asset_uid]
2 Likes
Could you help me, I canβt find the manage.py file
opt/kobo/
βββ kobo-docker
β βββ backups
β β βββ kobocat
β β βββ mongo
β β βββ postgres
β β βββ redis
β βββ doc
β β βββ aws-diagram.svg
β β βββ container-diagram.svg
β β βββ Makefile
β β βββ March-2019-Upgrade.md
β β βββ source
β β βββ conf.py
β β βββ development.rst
β β βββ index.rst
β β βββ installing_dependancies.rst
β β βββ local_setup.rst
β β βββ overview.rst
β βββ docker-compose.backend.primary.override.yml
β βββ docker-compose.backend.primary.override.yml.sample
β βββ docker-compose.backend.primary.yml
β βββ docker-compose.backend.secondary.override.yml
β βββ docker-compose.backend.secondary.override.yml.sample
β βββ docker-compose.backend.secondary.yml
β βββ docker-compose.backend.template.yml
β βββ docker-compose.frontend.override.yml
β βββ docker-compose.frontend.override.yml.sample
β βββ docker-compose.frontend.yml
β βββ docker-compose.maintenance.override.yml
β βββ docker-compose.maintenance.override.yml.sample
β βββ docker-compose.maintenance.yml
β βββ enketo_express
β β βββ favicon.ico
β β βββ icon_180x180.png
β βββ env
β β βββ enketo_express
β β β βββ config.json
β β βββ envfiles
β β β βββ aws.txt
β β β βββ databases.txt
β β β βββ enketo.txt
β β β βββ external_services.txt
β β β βββ kobocat.txt
β β β βββ kpi.txt
β β β βββ nginx.txt
β β β βββ smtp.txt
β β βββ envfile.txt
β β βββ README.md
β βββ log
β β βββ kobocat
β β β βββ celery_beat.log
β β β βββ celery.log
β β β βββ uwsgi.log
β β βββ kpi
β β β βββ celery_beat.log
β β β βββ celery.log
β β β βββ celery_sync_kobocat_xforms.log
β β β βββ uwsgi.log
β β βββ mongo
β β βββ nginx
β β β βββ access.log
β β β βββ enketo_express.access.log
β β β βββ enketo_express.error.log
β β β βββ error.log
β β β βββ kobocat.access.log
β β β βββ kobocat.error.log
β β β βββ kpi.access.log
β β β βββ kpi.error.log
β β βββ postgres
β β βββ redis_cache
β β β βββ redis-enketo-cache.log
β β βββ redis_main
β β βββ redis-enketo-main.log
β βββ mongo
β β βββ backup-to-disk.bash
β β βββ backup-to-s3.py
β β βββ entrypoint.sh
β β βββ init_01_add_index.sh
β β βββ init_02_create_user.sh
β β βββ post_startup.sh
β β βββ toggle-backup-activation.sh
β β βββ upsert_users.sh
β βββ nginx
β β βββ docker-entrypoint.d
β β β βββ 30-init-kobo-nginx.sh
β β β βββ 30-init-maintenance-nginx.sh
β β βββ kobo-docker-scripts
β β β βββ include.server_directive_common.conf
β β β βββ nginx.conf
β β β βββ templates
β β β βββ include.https_redirection.conf.tmpl
β β β βββ maintenance_default.conf.tmpl
β β β βββ nginx_site_default.conf.tmpl
β β β βββ proxy_pass.conf.tmpl
β β β βββ uwsgi_pass.conf.tmpl
β β βββ maintenance
β β βββ apple-touch-icon-114x114.png
β β βββ apple-touch-icon-72x72.png
β β βββ apple-touch-icon.png
β β βββ apple-touch-icon-precomposed.png
β β βββ background.jpg
β β βββ favicon.ico
β β βββ huge-background.jpg
β β βββ index.html.tmpl
β β βββ kobologo.svg
β βββ postgres
β β βββ backup-to-disk.bash
β β βββ backup-to-s3.py
β β βββ entrypoint.sh
β β βββ master
β β β βββ postgres.conf
β β βββ primary
β β β βββ clone_data_from_kc_to_kpi.sh
β β β βββ drop_kpi_tables_in_kc.sh
β β β βββ init_01_replication.sh
β β β βββ postgres.conf
β β βββ secondary
β β β βββ failover.sh
β β β βββ init_01_replication.sh
β β β βββ postgres.conf
β β β βββ recovery.conf
β β βββ shared
β β β βββ init_02_set_postgres_config.sh
β β β βββ init_03_firstrun.sh
β β β βββ pg_hba.conf
β β β βββ postgres.conf
β β β βββ upsert_users.sh
β β βββ toggle-backup-activation.sh
β βββ README.md
β βββ redis
β β βββ backup-to-disk.bash
β β βββ backup-to-s3.py
β β βββ entrypoint.sh
β β βββ redis-enketo-cache.conf.tmpl
β β βββ redis-enketo-main.conf.tmpl
β β βββ toggle-backup-activation.sh
β βββ scripts
β β βββ runtime_variables_kobocat.source.bash
β β βββ runtime_variables_kpi.source.bash
β β βββ wait_for_kpi.bash
β β βββ wait_for_mongo.bash
β β βββ wait_for_postgres.bash
β βββ uwsgi
β βββ kc_uwsgi.ini
β βββ kpi_uwsgi.ini
βββ kobo-env
β βββ enketo_express
β β βββ config.json
β βββ envfiles
β β βββ aws.txt
β β βββ databases.txt
β β βββ enketo.txt
β β βββ external_services.txt
β β βββ kobocat.txt
β β βββ kpi.txt
β β βββ nginx.txt
β β βββ smtp.txt
β βββ envfile.txt
β βββ postgres
β βββ primary
β β βββ postgres.conf
β βββ secondary
β βββ postgres.conf
βββ kobo-install
βββ conftest.py
βββ helpers
β βββ aws_validation.py
β βββ cli.py
β βββ command.py
β βββ config.py
β βββ __init__.py
β βββ network.py
β βββ __pycache__
β β βββ aws_validation.cpython-36.pyc
β β βββ cli.cpython-36.pyc
β β βββ command.cpython-36.pyc
β β βββ config.cpython-36.pyc
β β βββ __init__.cpython-36.pyc
β β βββ network.cpython-36.pyc
β β βββ setup.cpython-36.pyc
β β βββ singleton.cpython-36.pyc
β β βββ template.cpython-36.pyc
β β βββ updater.cpython-36.pyc
β β βββ upgrading.cpython-36.pyc
β βββ setup.py
β βββ singleton.py
β βββ template.py
β βββ updater.py
β βββ upgrading.py
βββ readme.md
βββ requirements_tests.txt
βββ run.py
βββ setup.py
βββ templates
β βββ kobo-docker
β β βββ docker-compose.backend.primary.override.yml.tpl
β β βββ docker-compose.backend.secondary.override.yml.tpl
β β βββ docker-compose.frontend.override.yml.tpl
β β βββ docker-compose.maintenance.override.yml.tpl
β βββ kobo-env
β β βββ enketo_express
β β β βββ config.json.tpl
β β βββ envfiles
β β β βββ aws.txt.tpl
β β β βββ databases.txt.tpl
β β β βββ enketo.txt.tpl
β β β βββ external_services.txt.tpl
β β β βββ kobocat.txt.tpl
β β β βββ kpi.txt.tpl
β β β βββ nginx.txt.tpl
β β β βββ smtp.txt.tpl
β β βββ envfile.txt.tpl
β β βββ postgres
β β βββ primary
β β β βββ postgres.conf.tpl
β β βββ secondary
β β βββ postgres.conf.tpl
β βββ nginx-certbot
β βββ data
β β βββ nginx
β β βββ app.conf.tpl
β βββ init-letsencrypt.sh.tpl
βββ tests
β βββ __init__.py
β βββ test_config.py
β βββ test_run.py
β βββ utils.py
βββ tox.ini
these are my files!!
Hi @Roger963, from your kobo-install
directory you can run this to get into the kobocat container:
./run.py -cf exec kobocat bash
or otherwise run:
docker exec -it $(docker ps | grep kobocat | awk '{print $1}') bash
and then from inside the container you can run the ./manage.py
command.
2 Likes