GithubHelp home page GithubHelp logo

cjz25 / cquestionnaire Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 25 KB

Build questionnaires

License: MIT License

Python 100.00%
django django-rest-framework drf-nested-routers python python3 restful-api restful mysql crud backend

cquestionnaire's Introduction

cquestionnaire

Build questionnaires

Table of contents

  1. Requirements
  2. Installation
  3. Usage
  4. License

Requirements

  • Python 3.7.4
  • MySQL Community Server 5.7.12

Installation

Install from the source:

$ git clone https://github.com/cjz25/cquestionnaire.git

Create a virtual environment:

$ cd cquestionnaire/
$ python3 -m venv env

Activate the virtual environment:

$ source env/bin/activate

Note: For Windows

> .\env\Scripts\activate

Install requirements:

$ pip3 install -r requirements.txt

Usage

Set up your configuration file: my.cnf

Note: Please make sure you have created a database.

Migrate

$ python3 manage.py migrate

Run the server

$ python3 manage.py runserver

You have the following APIs:

For questionnaires:

GET: /api/questionnaires/list?size=5&page=1
POST: /api/questionnaires/
GET: /api/questionnaires/<pk>/
PUT: /api/questionnaires/<pk>/
DELETE: /api/questionnaires/<pk>/

For questions with choices:

GET: /api/questionnaires/<questionnaire_pk>/questions/
POST: /api/questionnaires/<questionnaire_pk>/questions/
GET: /api/questionnaires/<questionnaire_pk>/questions/<pk>/
PUT: /api/questionnaires/<questionnaire_pk>/questions/<pk>/
DELETE: /api/questionnaires/<questionnaire_pk>/questions/<pk>/

For modifying the sequence of a question:

PUT: /api/questionnaires/<questionnaire_pk>/questions/<pk>/sequence/

License

MIT License

cquestionnaire's People

Contributors

cjz25 avatar

Watchers

 avatar

Forkers

thondchen

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.