Core functionnality & example project-dedicated microsites using bamboo+formhub.
formhub allows one to design a survey form using a spreadsheet software and convert it into an XForm. This XForm is then used to conduct the survey with an Android phone using the ODK Collect App.
formhub can store its collected data into bamboo a dataset store and webservice with computation capabilities.
Microsites are survey-specific websites aiming at providing real-life useful output from collected data. Microsites should provide all required raw, aggregated, computed and charted data for a particular survey.
Technically, a microsite is a django app which depends on the microsite app from this repo. microsite app provides helpers & common functionality to ease the process of creating a microsite.
Microsite consumes bamboo for data and use formhub to access meta data about the form used.
- Project management: A microsite app is built for a particular survey/form. A single form can be used to conduct multiple surveys: different countries or location for example. microsite handles projects so that the same app can be used for different surveys.
- Settings management: Each project can have an arbitrary number of key-value settings. microsite includes a U.I to edit those. Values are stored in JSON format. Required settings (automaticaly added):
bamboo_uri | bamboo URI |
bamboo_dataset | bamboo dataset for data |
bamboo_ids_dataset | bamboo dataset for IDs |
formhub_uri | formhub URI |
formhub_user | formhub User owning form for data |
formhub_form | formhub Form slug for data |
formhub_ids_user | formhub User owning form for IDs |
formhub_ids_form | formhub Form slug for IDs |
Installation is alike any typical django app. A list of PyPi requirements is available in requirements.pip. You might need to intsall ghostscript as it's a dependency of the QRcode generation library.
Create also the microsite/settings_local.py (from example). Notable variables:
IDGEN_BASE_URI | Base URL for generated IDs. |
IDGEN_FORMAT | Format for generated IDs. Defaults to _%(base_url)s/teachers/%(uuid)s?short=%(shortid)s_ |
KEY_NAME_NAMESPACES | List of (slug, Name) tuples describing the available namespaces for the app. See key-value pairs above. |