Coder Social home page Coder Social logo

q10r's Introduction

q10r

q10r is a simple questionnaire web app. It produces questionnaires from JSON files and stores submissions in JSON files under different directory. q10r also provides a page for viewing questionnaire results.

Demo

http://demo:[email protected]/q10r/ <-- list of questionnaires
http://vlevit.org/q10r/texteditor <-- questionnaire "texteditor"
http://demo:[email protected]/q10r/texteditor/results <-- results for questionnaire "texteditor"

Installation

q10r is a Flask blueprint. To install dependencies run

pip install -r requirements.txt

Then create a new application (or embed to the existing one). See example_app.py as for example. Create config similar to example_config.py. It must contain QUESTIONNAIRE_DIR which must point to a directory with questionnaire files and QUESTIONNAIRE_SUBMISSIONS_DIR where submissions will be written. Don't forget to udpate QUESTIONNAIRE_BASIC_AUTH tuple. It is used for authentication to the questionnaire list and results pages.

Usage

Site root provides a list of existing questionnaires with links to forms and results.

Look at questionnaires/texteditor.json for a questionnaire example. Each questionnaire is an object with the following keys:

extends
title
comment
template
submit
questions

With extends you can specify a different json file as a base, it should be prefixed with _ so it will not be considered a stand-alone questionnaire. With template you can specify alternative template. If not specified questionnaire.html is used. questions is a list of objects which represent (surprisingly) questions. Each such object must be one of the following types: string (text), text (textarea), radio and checkbox. radio, checkbox questions must have options. To mark option as "other" field (a field with a text input) prefix it with "+" sign.

You can override q10r templates by creating templates with the same names in your application's template directory or you can specify template option for desired questionnaires.

q10r's People

Contributors

vlevit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.