SoftDesk is an API for reporting and tracking technical issues.
PUT : /projects/1/
- Author of the project 1 can update it
- Contributor of the project 1 can read only detail
- Other user of the API (not author or contributor) of project 1 can't access detail information of project 1
- Python
- Django Rest Framework
- JSON Web Token
- Clone the repo
git clone https://github.com/Jliezed/oc_project_10_softdesk.git
- Go to your project directory
cd oc_project_10_litreview
- Install venv library (if not yet in your computer)
pip install venv
- Create a virtual environment
python -m venv env
- Activate the virtual environment
source env/bin/activate
- Install the packages using requirements.txt
pip install -r requirements.txt
- Create a copy of the file ".env.default" and rename it ".env"
- Set value to the .env file:
-
Define a secret key
-
Debug to True for local development or False for production
-
Allowed host equal to 127.0.0.1 for local environment
SECRET_KEY='YOUR SECRET KEY' DEBUG=True ALLOWED_HOSTS=['127.0.0.1']
-
python manage.py runserver
- Log to the API: http://127.0.0.1:8000/api/auth/login/
User: toto Password: secret
- Or create a superuser
python manage.py createsuperuser
- http://127.0.0.1:8000/api/projects/
- http://127.0.0.1:8000/api/projects/1
- http://127.0.0.1:8000/api/projects/1/users/
- http://127.0.0.1:8000/api/projects/1/issues/
- http://127.0.0.1:8000/api/projects/1/issues/1
- http://127.0.0.1:8000/api/projects/1/issues/1/comments/
- http://127.0.0.1:8000/api/projects/1/issues/1/comments/1