Skip to content

j0holo/library-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library managment system

A library managment system written with Flask and Peewee. Currently work in progress. Currently only a couple of administration pages work.

To-Do

  • Laying out all database models
  • Write accompanying methods for models
  • Write the administration pages
  • Change the way database configuration is being configured (currently not safe)
  • Program login portal for adminstration pages
  • Write customer pages e.g.:
    • book page
    • account information page
    • review page
    • home page
  • Connect customer login page so only logged in customer can write reviews and view their own account information
  • Give the site some style with CSS
  • Insert demo data into the database to improve the demo experience

How to run the demo version

Terminal commands are denoted by:$

  • clone the repo
  • $ pip install -r requiremenets.txt
  • $ sudo apt install mariadb-server or mysql-server
  • $ export DB_HOST="localhost" or you can use another IP address from where the database is running from.
  • Create two users for the database. The users that are configured for testing are development and unittest. Their passwords are devpassword and test_db.

PLEASE ONLY USE THESE SETTINGS FOR LOCAL TESTING! NEVER USE USERNAMES AND PASSWORDS PROVIDED BY A MAINTAINER FOR PRODUCTION USE!

  • Create two databases with the names devdatabase and test_db where development has access to devdatabase and unittest has access to test_db.
  • Run $ python models.py to create the tables in the databases
  • Run $ python unittests.py to run the unittests
  • Run $ python app.py to start the server. The website is available on 127.0.0.1:5000.

Currently this is not optimal at all, configuring the databases should be way more secure

License

This project is licensed under the MIT license, see LICENSE for more info.

About

A library managment system build with Flask and Peewee

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published