The repository has the following primary branches:
- master - This contains the code which has been released (production ready code).
- develop - This contains the latest code. All the contributing PRs must be sent to this branch.
- Create a virtual environment with Python3.7:
virtualenv env -p python3.7
. If you dont havepython3.7
yet then you can install it with:- linux(ubuntu/debian) -
sudo apt install python3.7
- windows - Download installer from https://www.python.org/downloads/release/python-370/.
- linux(ubuntu/debian) -
- Activate the virutal environment:
source env/bin/activate
- Install all the dependencies in
requirements.txt
file:pip install -r requirements.txt
- Make a copy of
.env.sample
to.env
and change the values of variables with original values. Click here for sample .env file. - See below for celery setup.
- See below for email setup.
- Migrate the migrations:
python manage.py migrate
- Run the app:
python manage.py runserver
- Navigate to http://localhost:8000 in your browser
- When you are done using the app, deactivate the virtual environment:
deactivate
SECRET_KEY='iamthegodofsecretkeys'
ALLOWED_HOSTS='*'
DEBUG='True'
EMAIL_HOST_USER='[email protected]'
EMAIL_HOST_PASSWORD='wnejszjzrvacvkpn'
MOCK_EMAIL ='True'
note:
- MOCK_EMAIL defaults to True
For gmail:
- If your are using gmail then normal password is not enough to send email through django email package. You have to enable two step verification in https://myaccount.google.com/security.
- Then generate a new app password for teesco.
- The app password will look like this.
- This 16 letter code should be set to
EMAIL_HOST_PASSWORD
in.env
. - We have added below images for help.
Other than gmail: Other email providers like outlook, hotmail, rediffmail, yahoo mail etc., should work with normal email password. Else they will have a similar approach.
For linux
sudo apt install redis-server
- In a separate terminal run
celery -A server worker -l info
when the celery command is needed. - If you see the below image celery is running successfully in your system.
For windows
- Even though redis can be installed in windows but the celery(a python package needed in this project) doesn't work on windows.
- Dont you worry we are exploring other alternatives for windows.
- Still you can contributions which dont require celery. Open two terminals and run on second terminal