This is the backend code written in Django for the ABC Management Inc. client management system. It will act as the mediator between the frontend and database of the project.
NOTE: You must first start your MySQL Server on your local machine. (Make sure it can be connected to through MySQLWorkbench)
- Clone this repo onto your local machine.
- Navigate to the
software-engineering-project-backend/swe-project-backend-api
folder. (You will know if you are in the right folder if you see the requirements.txt file) - Run the following command in your terminal from the directory:
pip install -r requirments.txt
- Navigate to the
software-engineering-project-backend/swe-project-backend-api/sweClassProjectBackend/sweClassProjectBackend
folder. (You will know if you are in the right folder if you see the settings.py file) - Create a file named
".env"
. (Ensure that the file extension of this file is .env and not anything else) - In this file create 3 variables using this format:
SQL_PASSWORD={
Your Password to your mySQL instance
}Ex: SQL_PASSWORD=specialpassword
SQL_USERNAME={
Your username to your mySQL instance
}Ex: SQL_USERNAME=specialusername
SECRET_KEY={CONTACT ME FOR THE KEY via text or email}
- Now navigate to the
software-engineering-project/swe-project-backend-api/sweClassProjectBackend
folder (You will know if you are in the right folder if you see the manage.py file) and run the following command:python3 manage.py runserver
- You may have to migrate the changes from the Django project to your mySQL instance but the command line will tell you the commands to do so.