This web application is a sort of admin dashboard in website of IT company. It includes webpages with data about departments and employees and tools to manipulate it.
- Firstly, you need to install python 3 and mysql on your computer. In database create user
root
with passwordroot
. - Need to clone the project to your local computer with following command:
git clone https://github.com/Polina-Prakhova/Final-Project.git
or
git clone [email protected]:Polina-Prakhova/Final-Project.git
- (Optional) Open project folder, create virtual environment and activate it:
python3 -m venv venv
. venv/bin/activate
- Run setup file to install all necessary packages:
python3 setup.py install
- Now enter this command in terminal to run Gunicorn:
gunicorn -c gunicorn_config.py "department-app.wsgi:create_app()"
Congratulations! The application is running and available by localhost:8001 (if you haven't changed it in configs).
Web service is available at the following URLs:
URL | HTTP method | Description |
---|---|---|
/api/departments | GET | Returns collection of departments |
/api/departments | POST | Adds new department |
/api/departments/<id> | GET | Returns certain department |
/api/departments/<id> | PUT | Updates certain department |
/api/departments/<id> | DELETE | Deletes certain department |
/api/employees | GET | Returns collection of employees |
/api/employees | POST | Adds new employee |
/api/employees/<id> | GET | Returns certain employee |
/api/employees/<id> | PUT | Updates certain employee |
/api/employees/<id> | DELETE | Deletes certain employee |
Web application is available at the following URLs:
URL | HTTP method | Description |
---|---|---|
/departments | GET | Returns table with collection of departments |
/departments/<id> | GET | Returns table with information about certain department |
/departments/<id>/add | GET | Returns the form to create department |
/departments/<id>/add | POST | Adds new department to database |
/departments/<id>/update | GET | Returns the form to update certain department |
/departments/<id>/update | POST | Updates information department in database |
/departments/<id>/delete | POST | Deletes certain department from database |
/employees | GET | Returns table with collection of employees |
/employees/<id> | GET | Returns table with information about certain employees |
/employees/<id>/add | GET | Returns the form to create employees |
/employees/<id>/add | POST | Adds new employees to database |
/employees/<id>/update | GET | Returns the form to update certain employees |
/employees/<id>/update | POST | Updates information employees in database |
/employees/<id>/delete | POST | Deletes certain employees from database |