项目作者: tolopsy

项目描述 :
A full fledged ecommerce platform with asynchronous task manager and PDF generator for orders. Built with Django.
高级语言: CSS
项目地址: git://github.com/tolopsy/django-ecommerce.git
创建时间: 2020-10-28T18:24:36Z
项目社区:https://github.com/tolopsy/django-ecommerce

开源协议:

下载


AN E-COMMERCE DJANGO PROJECT.

Django ecommerce website with full-fledged backend features like mailing order to customers, printing order pdfs and managing asynchronous tasks.

The templates used in the frontend is designed by https://boostrapious.com.

The templates are great for learning how to build an e-commerce website.

Follow the following steps to run this in your local machine

  1. virtualenv env
  2. source env/bin/activate
  3. pip install -r requirements.txt
  4. python manage.py makemigrations
  5. python manage.py migrate
  6. python manage.py runserver

Follow the following steps to run the asynchronous task manager (Celery + RabbitMQ)

  1. Install RabbitMQ on Linux by executing the command below from the shell

    1. apt-get install rabbitmq

    If you’re using macOS or Windows, click here to download the standalone version of RabbitMQ.

  2. After installing, RabbitMQ, execute the following commmand to launch RabbitMQ

    1. rabbitmq-server
  3. Open a new shell, change directory to your project directory and start your
    celery worker with the following command

    1. celery -A myshop worker -l info

    Note that celery has been installed when you ran ‘pip install -r requirements.txt’

  4. To monitor asynchronous tasks with Flower - a web application for monitoring
    celery. Open a new shell and run the following command from your project directory.

    1. celery -A myshop flower

Technologies used

  1. Weasyprint - To create pdf receipt for orders. Find implementation in
    views.py of orders app (line 44 - 52).

  2. Celery - To handle asynchronous tasks - Example: sending order mails
    to customers. Find implementation in celery.py of ecommmerce folder, tasks.py of orders app and line 28 of views.py

  3. RabbitMQ - Used as message broker for celery

  4. Flower - Used to monitor Celery