CI:
PyPI:
Docs:
Telegram Bot for Django-Oscar ecommerce.
The full documentation is at https://django-oscar-telegram-bot.readthedocs.org.
This package uses django-telegram-bot, take a look to https://github.com/jlmadurga/django-telegram-bot
Install django-oscar-telegram-bot:
pip install django-oscar-telegram-bot
Add it to your INSTALLED_APPS:
INSTALLED_APPS = [ ... 'oscar_telegrambot', # this app 'telegrambot', # django-telegram-bot 'rest_framework', # django-telegram-bot uses django-rest-framework ... ]
Configure in settings:
TELEGRAM_BOT_COMMANDS_CONF = "oscar_telegrambot.commands"
As other django-telegram-bot app set your Bots with admin panel.
Add url to have webhook:
url(r'^telegrambot/', include('telegrambot.urls', namespace="telegrambot")),
To set the webhook for telegram you need django.contrib.sites
installed, SITE_ID
configured in settings and
with it correct value in the DB.
You can take a look to a demo repo using the sandbox in https://github.com/jlmadurga/django-oscar-telegram-bot-demo. This demo is already installed in http://django-oscar-telegram-bot-demo.herokuapp.com/en-gb/ and you can test the bot https://telegram.me/djangooscartelegrambotdemo_bot
- Wellcome and help commands
- Unknown command handler
- Categories list command
- Products list command
- Product detail command
- Order list&detail command only when logged
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install -r requirements-test.txt (myenv) $ python runtests.py