| Requirement | Version |
|---|---|
| Python | > 3.* |
| Django | 2.. |
First clone this repository:
git clone https://github.com/UriMiranda/employeesmanager.git && cd employeesmanger/Then install project requirements:
pip3 install -r requirements.txtRun migrations:
python3 manage.py migrateLoad departament and admin data:
python3 manage.py loaddata departaments admin --database=defaultRun server:
python3 manage.py runserverAccess admin: http://loacalhost:8000/admin
| User | Password |
|---|---|
| admin | test |
| Departaments | ID |
|---|---|
| T.I. | 1 |
| Financeiro | 2 |
| Vendas | 3 |
| RH | 4 |
Listing all employees
GET http://localhost:8000/employeesCreate a employee
POST http://localhost:8000/employees/storeBODY:
{
"name": "Test employee",
"email": "test@test.com",
"departament": 1
}Delete a employee
GET http://localhost:8000/employees/delete/<id:int>python3 manage.py test employees