Eco Rewards is a reward system focusing on increasing consumers’ awareness of environment protection during their daily activities. The system aims at helping people to make more eco-friendly purchases.
Consumers who want to contribute their efforts on protecting environment.
Consumers who are lacking awareness of environment protection
https://drive.google.com/file/d/1RXOT-DT5sB8NG5My6jmeXHQK9m78LEOr/view?usp=sharing
https://outline.touryx.com:9443/s/49999f0e-d491-4c2e-b02c-9cb3ae08aa84
Assume you have docker & docker-compose installed
By default, the container will listen on 127.0.0.1:8000
- Clone this repo then go to directory LP2T2X
- Edit environment variable in the docker-compose.yml as needed.
- run
docker compose up -d
ordocker-compose up -d
depands how you installed docker-compose.
You may copy and paste following command to simply deploy it.
mkdir -p ~/git && \
git clone https://github.com/languede/LP2T2X.git && \
cd LP2T2X && \
sudo docker compose up -d
Done!
I am using anaconda to manage all the packages, it is strongly recommand to install Miniconda/Anaconda on your local system before you depoly this Django project.
About installing Anaconda please refer to their official documents: https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html
If not useing anaconda, refer to the root path LP2T2X/
use the requirements.txt to create a python virtual environment
- Clone this repo by run
git clone https://github.com/languede/LP2T2X.git
- Go to the project directory
LP2T2X/ECO/
- In case you have anaconda installed, create virtual environment from the environment.yml file, run
conda env create -f environment.yml
- Find and Edit setting.py under the path 'LP2T2X/ECO/eco/'
- Edit the list variable ALLOWED_HOSTS by append/adding for example
localhost
or anyother ip you want. - Back to the project root directory which contain the manage.py file
- In the terminal, type
python manage.py runserver
to run Django project
p.s. If there were missing pacakages, try pip install <missing pacakage>
to fix this error
p.s. use python manage.py runserver 0.0.0.0:8080
to make the web server listen on 0.0.0.0 and port 8080
For MacOS user:
Since zsh
does not support django-phonenumber-field[phonenumberslite]
Please type bash
in mac's terminal to switch default shall to bash
,
That is:
run bash
in terminal // switch to bash shell
refer to environment.yml in LP2T2X/ECO/ to see the packages list
pip3 install django-phonenumber-field
pip3 install django-simple-history
pip3 install pyzbar opencv-python
pip3 install pillow
direct to manage.py , type: python3 manage.py runserver <host_address:port_number>
pip install pillow
pip install django-phonenumber-field[phonenumberslite]
pip install django-simple-history
pip install pyzbar opencv-python
pip install stripe3