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.txt
Run migrations:
python3 manage.py migrate
Load departament and admin data:
python3 manage.py loaddata departaments admin --database=default
Run server:
python3 manage.py runserver
Access 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/employees
Create a employee
POST http://localhost:8000/employees/store
BODY:
{
"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