Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Enketo API for all webform URLs (no hardcoded webform urls) #1344

Open
MartijnR opened this issue Oct 1, 2014 · 0 comments
Open

Use Enketo API for all webform URLs (no hardcoded webform urls) #1344

MartijnR opened this issue Oct 1, 2014 · 0 comments

Comments

@MartijnR
Copy link

MartijnR commented Oct 1, 2014

Simplify the Enketo settings. You really only need 2 settings: enketo_api_url and enketo_api_token.

This means removing the hardcoded webform urls from settings.py and use the Enketo API to always request the webform url. This will make OnaData compatible with enketo-express (the future of enketo) The new app will use the exact same API but a very different (muuuuuch nicer) URL structure.

If performance is a concern, maybe consider using the /survey/all endpoint upon page load which would then allow you to redirect to the appropriate webform URL immediately when a user clicks a button. It may even be worth caching the response for the next page load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant