Allows the creation of custom questionnaires and surveys via the admin.
To set the apiRoot use ProjectConfigProvider.setApiRoot()
Create an admin.py with the following content:
from django.contrib import admin
from surveys.base_admin import (
SurveyAdmin,
SurveyFieldAdmin,
SurveyFieldOrderingAdmin,
SurveyFieldsetAdmin,
SurveyFieldsetOrderingAdmin,
UserResponseAdmin,
)
from surveys.models import (
Survey,
SurveyField,
SurveyFieldOrdering,
SurveyFieldset,
SurveyFieldsetOrdering,
UserResponse,
)
admin.site.register(models.SurveyField, SurveyFieldAdmin)
admin.site.register(models.SurveyFieldset, SurveyFieldsetAdmin)
admin.site.register(models.Survey, SurveyAdmin)
admin.site.register(models.SurveyFieldOrdering, SurveyFieldOrderingAdmin)
admin.site.register(models.SurveyFieldsetOrdering, SurveyFieldsetOrderingAdmin)
admin.site.register(models.UserResponse, UserResponseAdmin)Please follow the instructions for adding languages to the projects using the parler documentation parler: https://github.com/django-parler/django-parler
All frontend is located under web/:
npm installto install requirementsbower installto install dependenciesgrunt testto test if everything is working properlygruntwill start a dev server running underlocalhost:9000.
This project uses babel and browserify. Source files are located in web/app/scripts/src. Compiled files are put into web/dist, which is symlinked to web/app/scripts/js-build for easy testing in the browser.
The are two grunt karma targets:
grunt karma:devonce run will continue to watch the compiled.jsfiles directory and the test files.grunt karma:citarget only runs once. This target is also used in Travis
- Commit your changes.
- Follow the guidelines at http://semver.org/ to determine your new version number.
- Update
CHANGELOG.mdwith your new version number and a description of changes. - Update the
versionproperty inpackage.json - Update the
versionproperty insetup.py - Commit those changes with the commit message "Bump to [version number]". [version number] should be in the format x.y.z.
git tag [version number]git pushgit push --tags- must be done separately.- Run
make releaseto publish the release to pypi