Skip to content

Commit

Permalink
Update ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
JungDev committed Jan 26, 2016
1 parent 9c205b7 commit 5540c86
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,40 @@ Quickstart
Install django-telegrambot::

pip install django-telegrambot
Configure your installation
---------------------------

Add ``django_telegrambot`` in ``INSTALLED_APPS`` ::

Add "django_telegram_bot" to your INSTALLED_APPS setting
like this:
```python
#settings.py
INSTALLED_APPS = (
...
'django_telegram_bot'
'django_telegrambot',
...
)
```
Configure your installation ::

```python
And set your bots::

#settings.py
#Django Telegram Bot settings
TELEGRAM_BOT_TOKENS = ('BOT_1_token','BOT_2_token',)
TELEGRAM_WEBHOOK_SITE = 'https://mysite.it'
TELEGRAM_WEBHOOK_BASE = '/baseurl'
#TELEGRAM_BOT_CERTIFICATE = 'cert.pem' #If your site use self-signed certificate, must be set with location of your public key certificate. (More info at https://core.telegram.org/bots/self-signed )

```
Include in your urls.py the ```'django_telegrambot.urls'``` using the same value of ```TELEGRAM_WEBHOOK_BASE``` :
```python

Include in your urls.py the ``django_telegrambot.urls`` using the same value of ``TELEGRAM_WEBHOOK_BASE`` ::

#urls.py
urlpatterns = [
...
url(r'^baseurl/', include('django_telegram_bot.urls')),
...
]

```
Then use it in a project creating a module ```telegrambot.py``` in your app like this:
Then use it in a project creating a module ``telegrambot.py`` in your app ::

```python
#myapp/telegrambot.py
from django_telegrambot.apps import DjangoTelegramBot

Expand Down Expand Up @@ -95,7 +94,6 @@ Then use it in a project creating a module ```telegrambot.py``` in your app like
# log all errors
dp.addErrorHandler(error)

```

Features
--------
Expand Down

0 comments on commit 5540c86

Please sign in to comment.