A Shop with Django and Django-REST API

This project is a simulation of Digimobile that implemented as SSR and CSR

image

Installing and Getting Started:

  1. Clone project into a directory:
git clone https://github.com/Mohammadihpython/shop.git
  1. Open terminal and go to PostgreSQL with:
sudo -su postgres
  1. Go to PostgreSQL terminal with:
psql
  1. Create a database with:
create database database_name;
  1. Create a user with:
create user your_usename with encrypted password 'your_password';
  1. Grant privileges to yourself:
grant all privileges on database database_name to your_usename;
  1. Go to this website and create a secret key:

8 ??

  1. 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"
  1. install requirements of the project:
pip install -r requirements.txt
  1. Migrate the migrations:

first:

python manage.py makemigrations

then:

python manage.py migrate
  1. Run Celery with:
celery -A OnlineWallet worker -l info -P gevent
  1. Run Server and start use this project:
python manage.py runserver

Built With:

  • Django - Framework used
  • [DRF]
  • [javascripts(ajax)]
  • PostgrSQL - Used PostgrSQL database to store data
  • Redis - Used to queuing tasks
  • Celery - Used for asynchronous tasks