Skip to content

2-towns/djib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Djib bot

Djib bot is a bot allowing to order product online (book, clothers...)

Install

Dependencies

Run the install command:

python -m pip install -r requirements.txt

Settings

Copy the file djib/settings_template.py to djib/settings.py and made the changes that you need.

Database migration

Run the migrate command:

python manage.py migrate

Telegram Bot creation

For development purpose, create your own bot with BotFather.

Get the token and use it in the Django App.

Ain configuration

Install Ain then create a .env file (look at the .env.example template.) Replace the TOKEN variable by the telegram bot token (in the URL variable to).

Ngrok

Download Ngrok and put it into the root folder of the application.

Run

Start the run server:

python manage.py runserver

Start ngrok:

./ngrok http 8000

Copy the https URL and add it as a prefix of the URL variable into the .env file. Take the right side of the telegram token after :. Example with: XXX:YYYYYYY, you should have something like https://ad7b-41-98-224-108.eu.ngrok.io/bot/YYYYYYY...

You have to update the NGROK_HOST in your settings.

Access to your telegram Bot. You should receive a Coucou message.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published