An administration web to help automating Alkafgrosir's (an online seller) administration process. Built using Django 4.1.2.
- Python 3.8 or higher (tested in Python 3.9, and 3.10)
-
Clone the project
using SSH:git clone git@github.com:FerdiantJoshua/alkafgrosir-administration.git
or using HTTPS:
git clone https://github.com/FerdiantJoshua/alkafgrosir-administration.git
-
Change to the directory
cd alkafgrosir-administration
-
Create project environtment using
virtualenv
python -m virtualenv venv
-
Activate the virtual environment
Windowsvenv/Scripts/activate.bat
Linux or Mac
source venv/bin/activate
-
Install dependency
pip install -r requirements.txt
-
Create your .env file (check for .env.example)
for example:
ALLOWED_HOSTS = localhost,127.0.0.1 DEBUG = False DB_NAME = alkaf_administration DB_USER = root DB_PASSWORD = password DB_HOST = 127.0.0.1 DB_PORT = 3306 DEV_MODE = False SECRET_KEY = {your_secret_key}
-
Create your own secret key
python manage.py shell
You will run a Django shell, then run this script inside the Django shell:
from django.core.management.utils import get_random_secret_key print(get_random_secret_key()) exit()
-
Put the printed secret key in SECRET_KEY variable in .env
-
Migrate the database
python manage.py migrate
-
Run the server
python manage.py runserver 0.0.0.0:8000
- Rename
.env.example
to.env
- Modify and adjust any variables according to your configuration
- Author: FerdiantJoshua