Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Telegram Bot for Oscar shops

Project Description

CI:

PyPI:

Docs:

Telegram Bot for Django-Oscar ecommerce.

Documentation

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

Quickstart

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 bot token:

TELEGRAM_BOT_TOKEN = os.environ.get('TELEGRAM_BOT_TOKEN', None)

Add url to have webhook:

url(r'^telegrambot/', include('telegrambot.urls', namespace="telegrambot")),

Use command set_webhook to specify the url to receive the incoming updates via webhook:

$ python manage.py set_webhook

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

Features

  • Wellcome and help commands
  • Unknown command handler
  • Categories list command
  • Products list command
  • Product detail command
  • Order detail command

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements-test.txt
(myenv) $ python runtests.py

History

0.1.0 (2016-01-26)

  • First release on PyPI.
Release History

Release History

History Node

0.5.0

History Node

0.4.0

History Node

0.3.0

This version
History Node

0.2.1

History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_oscar_telegram_bot-0.2.1-py2.py3-none-any.whl (12.2 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jan 29, 2016
django-oscar-telegram-bot-0.2.1.tar.gz (8.4 kB) Copy SHA256 Checksum SHA256 Source Jan 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting