this project is my final project of maktab-sharif-53(online-shop by django)
Bilingual Online Shopping System Project with Python & Django Framework & REST API
- Back-End: Python, Django, REST API
- Data Base: PostgreSQL
- Front-End: HTML5, CSS3, JavaScript, Bootstrap5, jQuery, AJAX
- Clone the Project
git clone https://github.com/Morteza078/online-shop.git
- Cd to online-shop folder and Create a Virtual Environment
cd online-shop
py -3 -m venv venv
- Activate the Interpreter of the Virtual Environment
- Windows:
venv\Scripts\activate
- windows in git bash:
source venv/Scripts/activate
- Linux:
source venv/bin/active
- Create a database called
shop
on your system and import shop.pgsql - In settings.py, set up the database as follows:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'shop', 'USER': 'postgres', 'PASSWORD': 'your password', 'HOST': '127.0.0.1', 'PORT': '5432', } }
- In settings.py, set up the email as follows:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_USE_TLS = True EMAIL_PORT = 587 EMAIL_HOST_USER = 'your email' EMAIL_HOST_PASSWORD = 'your email password'
- Install the Requirements
pip install -r requirements.txt
- Write the Following Commands to Create Your Tables
python manage.py makemigrations
python manage.py migrate
- Write the Following Command to Create a Superuser
python manage.py createsuperuser
- Write the Following Command to Run the Server
python manage.py runserver