Skip to content

i-terzic/STC_CODE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time Tracking Tool for university project

Usage

to install all requirements run:

python3 -m venv venv

python3 -m pip install -r requirements.txt

to create all users for your database

  1. Run
python3 manage.py runserver

once to create a database.

  1. Quit the process and run:
python3 manage.py shell

to add some Roles and Users run:


from app import db
from app.models import User, Role

employee_role = Role(name = 'employee')
supervisor_role = Role(name = 'supervisor')
hr_role = Role(name = 'hr')

user_test_1 = User(email = '[email protected]', password = 'password', full_name = 'Max Mustermann', role=employee_role)
user_test_2 = User(email = '[email protected]', password = 'password', full_name = 'John Doe', role=supervisor_role)
user_test_3 = User(email = '[email protected]', password = 'password', full_name = 'Anita John', role=hr_role)

db.session.add_all([employee_role, supervisor_role, hr_role, user_test_1, user_test_2,user_test_3])
db.session.commit()
  1. After that you can quit the shell by running
quit()
  1. to run the application run:
python3 manage.py runserver

again.

Testing

  1. Run the tests by typing
pytest

in your terminal.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published