Shop:
This project is a simulation of Digimobile that implemented as SSR and CSR
- Clone project into a directory:
git clone https://github.com/Mohammadihpython/shop.git
- Open terminal and go to PostgreSQL with:
sudo -su postgres
- Go to PostgreSQL terminal with:
psql
- Create a database with:
create database database_name;
- Create a user with:
create user your_usename with encrypted password 'your_password';
- Grant privileges to yourself:
grant all privileges on database database_name to your_usename;
- Go to this website and create a secret key:
8 ??
- create a local_settings.py file and enter local configs there:
local_settings.py:
API_KEY = 'your_API_KEY'
SECRET_KEY = 'your_SECRET_KEY'
DEBUG = True/False
DB_NAME = "your_database_name"
DB_USER = "your_database_username"
DB_PASSWORD = "your_database_user+password"
- install requirements of the project:
pip install -r requirements.txt
- Migrate the migrations:
first:
python manage.py makemigrations
then:
python manage.py migrate
- Run Celery with:
celery -A OnlineWallet worker -l info -P gevent
- Run Server and start use this project:
python manage.py runserver