Datasette plugin for creating surveys and collecting responses all in one place.
Project description
datasette-surveys
Construct and gather responses to surveys all within Datasette!
This plugin is based heavily on the officially amazing but unsupported Alpaca form builder.
Installation
python setup.py install
Usage
The plugin adds an interface at /-/surveys
and a "Surveys" link in the menu.
Configuration & Permissions
This plugin uses the permission plugin looking for responses to the following actions (they all start with surveys-
):
surveys-list
: allows actors to view the list of previously created surveys.surveys-create
: allows actors to create surveys. Won't allow overwriting by itself.surveys-update
: allows actors to update surveys, resource: id of the survey if being updated. This permission doesn't stop actors from updating with blank surveys or otherwise removing fields.surveys-delete
: allows actors to delete surveys. resource: id of the survey being deleted.surveys-view-form
: allows actors to view and respond to individual forms. resource: id of the survey.
One configuration option is available, which controls which directory the surveys folder will be placed.
# in your metadata.yml...
plugins:
datasette-surveys:
db_dir: /path/to/data
By default, the current working directory for the Datasette process will be used (assumed to be the same as the other DBs).
Development
The form builder borrows heavily from Alpaca's form builder and the front end build also comes from the Alpaca repo.
To pull the dependencies for the plugin, use bower:
bower install
And if you don't have bower, run this first: npm install -g bower
The form builder is found in datasette_surveys/static/form-builder.js
. It's a modified version of the Alpaca one.
Running python setup.py install
will reinstall the plugin.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file datasette-surveys-1.1.8.tar.gz
.
File metadata
- Download URL: datasette-surveys-1.1.8.tar.gz
- Upload date:
- Size: 23.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f86b606ce5779c9762152a80af9e52de431574dabd56da38b42d57ba8a77b22 |
|
MD5 | e87c81ce7bf946bcc32b4f38d6d9c63e |
|
BLAKE2b-256 | 0047bf2d61fcc736d238cf36caff5a4a628c2f5de3256a5c908e4c643d95163f |