Skip to content

Latest commit

 

History

History
66 lines (54 loc) · 1.87 KB

README.md

File metadata and controls

66 lines (54 loc) · 1.87 KB

Manager of Human Resources Department

Vision

«Manager of Human Resources Department» is a web-application which allows the manager of Human Resources Department to record and analyze the information about every employee of the company and every department as a group of employees.

The application should provide:

  • Storing the information of every employee and the summary information of every department as a group of employees;
  • Display the list of departments;
  • Updating the information of each department (adding, editing, and removing);
  • Display the total list of employees;
  • Updating the information about the employee (adding, editing, and removing);
  • Select the list of employees who have the same birth date;
  • Select the list of employees who were born in the fixed period between dates;

Prerequisites

  1. Windows or Unix based OS
  2. Pre-installed Python 3.6 or higher
  3. Pre-installed MySql
  4. Pre-installed Git
  5. Pre-installed pip

How to run this application?

  1. Create the directory for this application (for example, directory is called "department-app":
mkdir department-app
  1. Clone this repo:
git clone [email protected]:Anna050689/final_project.git
  1. Set the virtual environments
python -m venv /path/to/new/virtual/environment
. venv/bin/activate
  1. Install dependencies with pip:
pip install -r requirements.txt
  1. Create database in MySql and set the correct parameter SQLALCHEMY_DATABASE_URI in config.py file:
SQLALCHEMY_DATABASE_URI= 'mysql+mysqlconnector://root:password@localhost/name_of_database'
  1. Make sure to populate the database by opening a Python shell from within the app and running:
from app import db
from models import Department, Employee
db.create_all()
  1. Run the app:
export FLASK_APP='main'
export FLASK_ENV="development"
flask run