Личный кабинет для ООО "Ламарт" и платформа для performance review
- Create .env
- Run docker
- In terminal:
docker-compose up --build
After deploying you can find API docs here -> Redoc or Swagger
- Create virtualenv
python -m venv [path to venv folder]
- Activate virtualenv
source [path to venv folder]/Scripts/activate
- Install requirements.
pip install -r requirements/local.txt
- Set POSTGRES_HOST="localhost" in .env
- Run db
docker-compose up db --build -d
- Make migrations, migrate and run server
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
API uses bearer JWT authentication, read API docs for more info.
- For login or sign up: exchange provider oauth token* to refresh and acess jwt /auth/exchange_token/
- Refresh the access token if it's no longer valid by using /auth/refresh/
- Refresh token expires after 12 hours, do step 1 to get new.
- Yandex is the only provider available now.
To connect Jira you need:
- Create a new app in Developer Console
- Add all permissions with Jira API like read and etc, but no more 50 scopes.
- Open "Authorization" in left menu, configure OAuth 2.0
- You need to take URL from "Classic Jira platform REST API authorization URL"
- Add in your URL new param "offline_access" to the scope parameter, it will be looks like: ' %3Ajira-data-provider%20offline_access&redirect_uri'. You can past it to the right place, all the difference is in the offline access parameter.
- After accepting all accesses "code=" param is what you need.
- Exchange your authorization code to JWT token by auth/get_token_jira/