An API to report issues on SoftDesk app
git clone https://github.com/rhunold/projet10.git
python3 -m venv env
python3 source env/bin/activate
python3 -m pip install
pip install -r requirements.txt
You can use the database or create a new one (delete the db.sqlite3 file in the softdesk folder before.)
You can log after you run the server (see next 'Run server' instructions below.)
typeUser | password | user_id | |
---|---|---|---|
SuperUser | [email protected] | Héà2flzizl! | 1 |
User | [email protected] | tatatiti | 2 |
User | [email protected] | maxpass8 | 3 |
User | [email protected] | tompass8 | 4 |
To create a new database, first delete the actual one, then use theses line commands
python3 manage.py makemigrations api
python3 manage.py migrate
Database is created.
You can create a superuser
python3 manage.py createsuperuser
After environment is launch, use this command line to start the server
python3 manage.py runserver
Server adress : http://127.0.0.1:8000
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 |
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
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