This documentation provides instructions for setting up and running the Library Web App. It covers the required environment, installation of dependencies, database migration, and how to run the application.
Before you start, ensure that you have Python 3 installed on your local machine. You can download Python from the official Python website.
To create a virtual environment, follow these steps:
-
In the root project.
-
Run the following command to create a virtual environment named
venv:python -m venv venv
Once you have created the virtual environment, activate it using the instructions below.
source venv/bin/activatevenv\Scripts\activateOnce your virtual environment is activated, install the necessary dependencies for the project. Run the following command:
pip install -r requirements.txtThis command reads the requirements.txt file and installs the required packages.
Makesure you are in src directory.
cd srcAfter that you'll need to set up your database. Run the following command to apply migrations:
python manage.py migrateThis command creates the necessary database tables and sets up your application’s database schema.
Now that everything is set up, you can run the application. Use the following command:
python manage.py runserverThe server will start, and you should see output indicating that the development server is running. You can access the application by navigating to http://127.0.0.1:8000/ in your web browser.