Simple bot that uses a Telegram API to track financial spendings
- create a virtual environment inside a root folder
virtualenv --no-site-packages --distribute -p /usr/bin/python3 venv
- enter virtual environment
source venv/bin/activate
- install dependencies
pip install -r requirements.txt
- run migrations
python manage.py migrate
- create a
local_settings.py
file with your djangoSECRET_KEY
, telegramBOT_TOKEN
andAPP_URL
inmain
folder. Optionally you can addTIME_ZONE
andACTIVATION_KEY
for customization.
To generate BOT_TOKEN
you should create a new bot.
Expample:
SECRET_KEY = "my_secret_key"
BOT_TOKEN = "my_bot_token"
APP_URL = "https://my_domain.com"
Using this information, after you start the server, bot will automatically set webhook.
- enter virtual environment
source venv/bin/activate
- start django server
python manage.py runserver