- Python 3.10
- MySQL
To run this project, you need to have Python 3.10 installed on your computer. open a command prompt window, then follow these steps:
-
Clone this repository to your local machine.
git clone https://github.com/ziyanoffl/ERPsystem.git cd ERPsystem
-
Create a virtual environment with the command
python -m venv venv
-
Activate the virtual environment with the command
venv/Scripts/activate
-
Install the requirements with the command
pip install -r requirements.txt
-
Create a
.env
file in the project root and set the necessary environment variables.OPENAI_API_KEY=your_openai_key SECRET_KEY='django-insecure-^!+b-i-si6ape9v8*+c*nvbn^s#usv(+m&(6@v(5ih+93mpmu@' #database settings DB_NAME=erp_system DB_USER=root DB_PASSWORD=123456789 DB_HOST=localhost DB_PORT=3306
-
Create a database in mysql with the name "erp_system"
mysql -u root -p -e "CREATE DATABASE erp_system"
-
Import sample data from mysql file to the database
mysql -u root -p erp_system < erp_system.sql
-
Apply database migrations:
python manage.py makemigrations
python manage.py migrate
-
Create a superuser account for the Django admin:
python manage.py createsuperuser
-
Run the application with the command
python manage.py runserver
-
Open your browser and go to
http://127.0.0.1:8000