This order system is implemented with state machine supported workflow. The workflow controls the states of the order and the items in the order, what actions can be applied by what roles when the order is in a certain action, the next state and available roles and actions. Two type of orders, product order and service order, are implemented as examples. This order system can be used as middleware in various order centers in ecommerce platforms. For details, please read the wiki.
-
install Git, MySQL, virtualenv, pip
-
set up your project directory and activate your virtualenv
mkdir /path/to/yourproject cd /path/to/yourproject virtualenv your_venv_name cd your_venv_name source bin/activate
-
login your github account, and fork this project to your repository
-
get the source code
git clone https://your_github_account@github.com/your_github_account/easy_order.git
-
install dependency package
pip install -r pip_requirements.txt
-
initialize database
#login into your mysql db shell, then run the following create database order_system character set = 'utf8'; use order_system; #run the following django's command, it creates the tables and loads database data from your fixtures (json files in fixtures folder) python manage.py migrate
-
set up local settings
copy order_system/env_settings.tmpl content into order_system/env_settings.py, and change the values to your local environment settings
-
run tests
python manage.py test
-
install rabbitmq-server
-
start celery
./start_celery.sh
-
start easy_order server
./runserver.sh
-
start flower, web monitoring tool for celery
celery flower --port=9998 #default port is 5555
-
view the demo, for product order demo:
http://localhost:8000/demo/
-
and for service order demo:
http://localhost:8000/service_order_demo/