Documentation
+Survey Studio Docs
++ This service ships with a Django admin builder and public JSON endpoints + for rendering published surveys and receiving responses. +
+ +Setup
+python -m venv .venv
+.venv\Scripts\activate
+pip install -r requirements.txt
+python manage.py migrate
+python manage.py createsuperuser
+python manage.py runserver
+ Admin Workflow
+-
+
- Create a survey at /admin/. +
- Add questions inline on the survey page. +
- Add choices to single-choice and multiple-choice questions. +
- Set the survey status to Published. +
Public API
+/api/surveys/
+ List published surveys.
+/api/surveys/<slug>/
+ Read the survey schema with questions and choices.
+/api/surveys/<slug>/responses/
+ Submit an anonymous response.
+Answer Formats
+{
+ "respondent_email": "person@example.com",
+ "metadata": {
+ "source": "website"
+ },
+ "answers": [
+ {
+ "question": "name",
+ "value": "Alex"
+ },
+ {
+ "question": "experience",
+ "choice": "good"
+ }
+ ]
+}
+ + Answers can also be sent as an object keyed by question slug. Choice + answers accept either the choice value or choice id. +
+Configuration
+-
+
DJANGO_SECRET_KEY: required for production.
+ DJANGO_DEBUG: set to0in production.
+ DJANGO_ALLOWED_HOSTS: comma-separated host list.
+ SURVEY_API_CORS_ORIGINS: comma-separated origin list for/api/.
+