SQLITE is used for dev, Postgres in production.
-
Clone the repo: git clone https://github.com/Ahmed-Abdelgawad-Dev/Ecommerce-Django.git
-
Use a virtual environment that you prefere.Could be pipenv | venv | conda, go to Ecommerce folder.
-
activate your choice virtual environment(UNIX)
source ./venv/bin/activate
- Install the required packages for the project.
pip install -r requirements.txt
- Migrate:
python manage.py migrate
- create a user if needed or use (usr:admin - pwd:admin)
python manage.py createsuperuser
- run the project
python manage.py runserver
- Generate a secret key for Django if required
from django.core.management.utils import get_random_secret_key
print(get_random_secret_key())
- Or use this one in your .env file
SECRET_KEY = djangooooooooo-insecure-$iq$%bv5n_u2pwgc_g$m2rt8+*ht%r6j@9+89g_f0w%y6fyi%^