E_Shop is an innovative online store with two color themes (light/dark) for user convenience. Administrators have the ability to create products and manage them effectively. Users can easily add products to the cart, select the required quantity, and also use the implemented payment system for convenience during shopping. The simple and intuitive interface ensures ease of use for all users.
http://localhost:8000
To integrate the "Social application" with your project, follow these steps:
- Visit Google Cloud Console and CREATE PROJECT
- Navigate to APIs & Services > Credentials
- Click on "Create Credentials" and choose "OAuth client ID"
- Specify the application type as "Web application"
- Set the name of your client (e.g., "Social App Client")
- Under "Authorized redirect URIs," add the appropriate redirect URI for your application
- Click "Create" to generate your OAuth client ID and client secret
Once created, copy and securely store the generated Client ID and Client secret.
Client ID: Your_Client_ID
Client secret: Your_Client_Secret
python3 -m venv venv
.\venv\Scripts\activate
For MacOS
source venv/bin/activate
pip install -r requirements.txt
# Django configuration
SECRET_KEY=your_secret_key
DEBUG=1 # Set 1 or 0
#
# PostgreSQL (docker/local)
DB_ENGINE=django.db.backends.postgresql_psycopg2
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_PORT=your_db_port
#
# pgadmin container
PGADMIN_DEFAULT_EMAIL=your_pgadmin_email
PGADMIN_DEFAULT_PASSWORD=your_pgadmin_password
#
# Stripe payment
STRIPE_PUBLIC_KEY=pk_key
STRIPE_SECRET_KEY=sk_key
#
# Settings Gmail SMTP
EMAIL_HOST_USER=your@gmail.com
EMAIL_HOST_PASSWORD=your_email_password
e_shop_db
python manage.py migrate
python commands.py
Runserver:
python manage.py runserver
Celery worker:
celery -A E_Shop_config worker --loglevel=info
Celery beat:
celery -A E_Shop_config beat --loglevel=info
echo "Creating .env file..."
cat <<EOL > .env
# Django configuration
SECRET_KEY=your_secret_key
DEBUG=1 # Set 1 or 0
#
# PostgreSQL (docker/local)
DB_ENGINE=django.db.backends.postgresql_psycopg2
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_PORT=your_db_port
#
# pgadmin container
PGADMIN_DEFAULT_EMAIL=your_pgadmin_email
PGADMIN_DEFAULT_PASSWORD=your_pgadmin_password
#
# Stripe payment
STRIPE_PUBLIC_KEY=pk_key
STRIPE_SECRET_KEY=sk_key
#
# Settings Gmail SMTP
EMAIL_HOST_USER=your@gmail.com
EMAIL_HOST_PASSWORD=your_email_password
EOL
docker-compose up
docker exec -it django-container bash
python manage.py migrate
python commands.py
• 1.4 Configure "Change Sites"
• 1.5 Configure "Social application"
Create a database on localhost:5050- Open localhost:5050 in your browser.
- Register the server.
- In the connection settings:
- Host: postgres-container
- Username: postgres
- Password: your_password
⚠️ Try the link to the website - (coming soon)⚠️
1. Go to the Stripe registration page and create your profile:
Sign up for Stripe2. Confirm your account.
3. Navigate to the following link to obtain your API keys and copy them:
Stripe API Keys4. Paste to your .env:
STRIPE_PUBLIC_KEY=Publishable key STRIPE_SECRET_KEY=Secret key
- Visa: 4242 4242 4242 4242
- Mastercard: 5105 1051 0510 5100
- American Express: 3782 822463 10005
- Discover: 6011 1111 1111 1117
1. Create app password at the following link:
Google App Passwords2. Set the following in your settings:
EMAIL_HOST_USER=example@gmail.com EMAIL_HOST_PASSWORD=example_code
admin@gmail.com
Testpass1
user@gmail.com
Testpass1
Explore the visual journey of our E-Shop with these captivating screenshots:
ssh -R 80:localhost:8000 serveo.net
ssh -o ServerAliveInterval=60 -R QvaShquai.serveo.net:80:localhost:8000 serveo.net
python manage.py dumpdata E_Shop_Products --indent 4 > mydemodata.json
python manage.py dumpdata E_Shop_Users --indent 4 > my_users_data.json
python3 manage.py loaddata My_fixtures/my_products_data.json
python3 manage.py loaddata My_fixtures/my_users_data.json
celery -A E_Shop_config worker --loglevel=info
celery -A E_Shop_config beat --loglevel=info
redis-server
git commit --date="2023-05-05T12:00:00" -m "Updated"
git reset --soft HEAD~1
solve commands postgres already in use
sudo lsof -i :5432
sudo kill -9 <your_port>
sudo rm /tmp/.s.PGSQL.5432.lock
sudo rm /tmp/.s.PGSQL.5432
chmod 1777 /tmp
python manage.py test
coverage run --source='.' manage.py test
coverage html


