Skip to content

Commit

Permalink
Updated enketo express templates with 'text field character limit' an…
Browse files Browse the repository at this point in the history
…d 'map layers' (terrain, satellite, humanitarian)
  • Loading branch information
noliveleger committed Mar 13, 2020
1 parent a61b14c commit e450d53
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions templates/kobo-deployments/enketo_express/config.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,31 @@
"port": "${REDIS_MAIN_PORT}"
}
},
"google": {
"google": {
"api key": "${GOOGLE_API_KEY}",
"analytics": {
"ua": "${GOOGLE_UA}",
"domain": "${ENKETO_SUBDOMAIN}.${PUBLIC_DOMAIN_NAME}"
}
}
},
"text field character limit": 1000000,
"maps": [
{
"name": "humanitarian",
"tiles": [ "https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png" ],
"attribution": "© <a href=\"http://openstreetmap.org\">OpenStreetMap</a> & <a href=\"https://www.hotosm.org/updates/2013-09-29_a_new_window_on_openstreetmap_data\">Yohan Boniface & Humanitarian OpenStreetMap Team</a> | <a href=\"https://www.openstreetmap.org/copyright\">Terms</a>"
}, {
"name": "satellite",
"tiles": [ "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}" ],
"attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
}, {
"name": "terrain",
"tiles": [ "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png" ],
"attribution": "© <a href=\"https://openstreetmap.org\">OpenStreetMap</a> | <a href=\"https://www.openstreetmap.org/copyright\">Terms</a>"
}, {
"name": "streets",
"tiles": [ "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" ],
"attribution": "© <a href=\"https://openstreetmap.org\">OpenStreetMap</a> | <a href=\"https://www.openstreetmap.org/copyright\">Terms</a>"
}
]
}

2 comments on commit e450d53

@pixelead0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error:

root_:/home/kubrick/www/kobo-install/templates/kobo-deployments/enketo_express,
destination_directory_:/home/kubrick/www/kobo-deployments/enketo_express,
filenames_:[u'config.json.tpl'],
--------------------
t:<string.Template object at 0x7f9fd5ba7590>,
template_variables:{u'PRIVATE_DOMAIN_NAME': u'kobo.private', u'GOOGLE_API_KEY': u'', u'SMTP_PASSWORD': u'', u'SMTP_USE_TLS': True, u'REDIS_CACHE_PORT': u'6380', u'POSTGRES_PASSWORD': u'Y~GbI+sS!pyOEG+x', u'KOBOCAT_SUBDOMAIN': u'kc', u'SMTP_HOST': None, u'MASTER_BACKEND_IP': u'192.168.31.217', u'MONGO_BACKUP_SCHEDULE': u'0 1 * * 0', u'USE_KPI_DEV_MODE': u'#', u'AWS_BACKUP_MONTHLY_RETENTION': u'12', u'SOFT_LIMIT': 134217728, u'KPI_PATH': u'', u'KPI_RAVEN_DSN': u'', u'SMTP_USER': u'', u'KOBO_SUPERUSER_USERNAME': u'super_admin', u'NGINX_EXPOSED_PORT': u'80', u'USE_BACKUP': u'#', u'AWS_REDIS_BACKUP_MINIMUM_SIZE': u'5', u'AWS_MONGO_BACKUP_MINIMUM_SIZE': u'50', u'KOBOFORM_SUBDOMAIN': u'kf', u'WSGI_SERVER': u'uWSGI', u'SMTP_PORT': u'25', u'USE_AWS': u'#', u'LETSENCRYPT_EMAIL': None, u'USE_DNS': u'', u'KPI_RAVEN_JS_DSN': u'', u'MAX_REQUESTS': u'512', u'POSTGRES_BACKUP_SCHEDULE': u'0 2 * * 0', u'ENKETO_ENCRYPTION_KEY': u'060bc0642c6d97041b8532f0f1a9d6356f1715241e112ab89522e47a31064420e8eb5c8a65752d16d8d26342b91bc881d5c04b815ee5ed719f0f058e', u'KPI_DEV_BUILD_ID': u'', u'PUBLIC_DOMAIN_NAME': u'kobo.local', u'USE_KC_DEV_MODE': u'#', u'INTERNAL_DOMAIN_NAME': u'kobo.internal', u'KOBO_SUPERUSER_PASSWORD': u'VgF9vbX4KPF+zu', u'AWS_BACKUP_BUCKET_DELETION_RULE_ENABLED': u'False', u'POSTGRES_APP_PROFILE': u'Mixed', u'MONGO_PORT': u'27017', u'USE_X_FORWARDED_HOST': u'#', u'KC_PATH': u'', u'PROTOCOL': u'http', u'ENKETO_SUBDOMAIN': u'ee', u'NGINX_PUBLIC_PORT': u'80', u'OVERRIDE_POSTGRES_SETTINGS': u'#', u'AWS_BACKUP_WEEKLY_RETENTION': u'4', u'AWS_BACKUP_BUCKET_NAME': u'', u'POSTGRES_RAM': u'2', u'POSTGRES_DB': u'kobotoolbox', u'REDIS_MAIN_PORT': u'6379', u'WORKERS_START': u'1', u'POSTGRES_REPLICATION_PASSWORD': u'u739sxpt+fGGaxJ', u'USE_AWS_BACKUP': u'#', u'AWS_BUCKET_NAME': u'', u'POSTGRES_SETTINGS': u'', u'AWS_POSTGRES_BACKUP_MINIMUM_SIZE': u'50', u'DEBUG': False, u'WORKERS_MAX': u'2', u'AWS_ACCESS_KEY_ID': u'', u'USE_HTTPS': u'#', u'USE_MEDIA_BACKUP': u'#', u'ENKETO_API_TOKEN': u'9d7b980debf40401a190f0e610f659aa52b3563a58465070480550c3fa8bb699403da84bbfcaa043bc2b65042e33c14b5ffcb711e43b0f5f46545455', u'POSTGRES_USER': u'kobo', u'USE_PUBLIC_DNS': u'#', u'KOBOCAT_MEDIA_BACKUP_SCHEDULE': None, u'GOOGLE_UA': u'', u'LOCAL_INTERFACE_IP': u'192.168.31.217', u'AWS_BACKUP_YEARLY_RETENTION': u'2', u'POSTGRES_PORT': u'5432', u'KC_DEV_BUILD_ID': u'', u'DJANGO_SECRET_KEY': u'9860f89729b9304bcf26507ed946f5eca0eb0fa05e0b01fb', u'AWS_BACKUP_DAILY_RETENTION': u'30', u'AWS_BACKUP_UPLOAD_CHUNK_SIZE': u'15', u'POSTGRES_BACKUP_FROM_SLAVE': u'#', u'DEFAULT_FROM_EMAIL': u'support@kobo.local', u'AWS_SECRET_ACCESS_KEY': u'', u'REDIS_BACKUP_SCHEDULE': u'0 3 * * 0', u'USE_PRIVATE_DNS': u'', u'KOBOCAT_RAVEN_DSN': u''},
++++++++++++++++++++
Traceback (most recent call last):
  File "run.py", line 55, in <module>
    run(force_setup=True)
  File "run.py", line 28, in run
    Template.render(config)
  File "/home/kubrick/www/kobo-install/helpers/template.py", line 159, in render
    write_templates(root, destination_directory, filenames)
  File "/home/kubrick/www/kobo-install/helpers/template.py", line 148, in write_templates
    f.write(t.substitute(template_variables))
  File "/usr/lib/python2.7/string.py", line 176, in substitute
    return self.pattern.sub(convert, self.template)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 689: ordinal not in range(128)

@noliveleger
Copy link
Contributor Author

@noliveleger noliveleger commented on e450d53 Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pixelead0 , can you try with Python3, please? Python2 is deprecated and its support will be dropped soon.

Please sign in to comment.