This is a Library Management System.
To run the server, open this folder using command prompt and execute:
env\Scripts\activate.batOnce you've run that run
python shelfmaster.py
to run the server.
The admin login credentials is as follows
Username: rahulreji
Password: power
Run the following command after navigating to the directory you intend to clone the repo in.
git clone https://github.com/Whitespace404/ShelfMasterThis will create a clone of the current version of the repository in your system.
This project uses a virtual environment to ensure that dependencies required by different projects are kept distinct. You can create a virtual environment by running
python -m venv envWe shall use env as the name for our virtual environment, as is convention.
You can enter the virtual environment created in the last step using the following command
env\Scripts\Activate.bat
This will add a header that says (env) before or above your command
prompt, showing that you are in the virtual environment.
When you close the command prompt, you automatically exit the virtual environment. To exit manually simply run
deactivateYou must make sure that you are in the virtual environment
before you run the Python program. You may get an ModuleNotFoundError
if you are not. This is because the modules used in the program are unresolved because we have installed them
within our virtual environment, and not in our global Python installation. This is done to prevent package conflicts.
This project requires Flask and various other dependencies, which are external Python modules. These dependencies can be installed by running the following command. Make sure you are in the virtual environment before running this.
pip install -r requirements.txtIf this does not work, make sure you have Python and Pip installed properly. This video, may help, although it is intended for installation of the
Pygame module, it holds good for Flask as well.
Also note that you need not run this again if it is already installed.
Once you have completed all of the above steps and are in the virtual environment, you can run the following command to start the Flask web server, and run the code.
python run.py
Once you have run the code, visit localhost:5000 on a web browser to view it.
Running on your local network allows you to access the website from any device, as long as it is connected to the same WiFi network as the hosting server
Run the flask app with the following command instead to achieve this
flask --app shelfmaster run -h 0.0.0.0