Giter Club home page Giter Club logo

projet10's Introduction

API - SoftDesk

An API to report issues on SoftDesk app

Installation

Clone this repository

git clone https://github.com/rhunold/projet10.git

Create an environment at the root of the project

python3 -m venv env

Activate the environment

python3 source env/bin/activate

Install pip

python3 -m pip install 

Install the requirements

pip install -r requirements.txt

Database

You can use the database or create a new one (delete the db.sqlite3 file in the softdesk folder before.)

Using the actual database

You can log after you run the server (see next 'Run server' instructions below.)

Access of the actual database

typeUser email password user_id
SuperUser [email protected] Héà2flzizl! 1
User [email protected] tatatiti 2
User [email protected] maxpass8 3
User [email protected] tompass8 4

Create a new database

To create a new database, first delete the actual one, then use theses line commands

Make migrations

python3 manage.py makemigrations api

Migrate

python3 manage.py migrate

Database is created.

You can create a superuser

python3 manage.py createsuperuser

Run server

After environment is launch, use this command line to start the server

python3  manage.py runserver

Server adress : http://127.0.0.1:8000

Actions and permissions

Action Permission
Signup Everyone
Login Everyone who had signup
Create a project Every logged user
Add and remove contributors of a project Project creator
Create issues and comments Project contributor/creator
List and read issues Project contributor/creator
List and read comments Project contributor/creator
Modify or delete project, issue and comment Project/Issue/Comment creator
All actions on all objects Superuser

API documentation

On the documentation, you can see all the endpoints and also some rules about permissions, contraints and restrictions.

API documentation : https://documenter.getpostman.com/view/25526925/2s8ZDeSy1a

Other things about this project

This project use the module flake8 to respect pep8 guideline. To test it by yourself, go to the root of the project and use this command line to generate a html file in the flake8 folder.

flake8 softdesk --format=html --htmldir=flake8-report --max-line-length=120 --exclude=migrations
flake8 softdesk --max-line-length=120 --exclude=migrations

projet10's People

Contributors

rhunold 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.