Create your own Telegram bot with Django on Heroku – Part 8 – Integrating the database

Header Image showing Django, Telegram, Heroku logos
This entry is part 8 of 11 in the series Create your own Telegram bot with Django on Heroku

Django_Pony

⚠️ This article is outdated and discontinued since Heroku decided to no longer offer their free tiers as this article series suggests to use in August, 2022. Please see this post for details. ⚠️

In the previous part of this series, we had a bit of a term definition to make it easier for beginners of Django to understand what I am talking about. Also, we created a Django – App called “bot” and created a URL routing for it to be available at (https://dry-tundra-61874.herokuapp.com)/bot/* (or whatever your URL looks like) and how to direct URLs to a view.

Originally, I planned to also show how to start using a database in Django to hold your bot’s data. But since the article grew larger than I anticipated before, I had to cut that down, unfortunately (sorry for that ?).
Today, I will deliver that part in its own article. We will learn how to work with databases in Django, what migrations are and how to interact with the database from within Django’s Admin-Backend.
Continue reading “Create your own Telegram bot with Django on Heroku – Part 8 – Integrating the database”

Create your own Telegram bot with Django on Heroku – Part 7 – Introducing apps and URLconf

Header Image showing Django, Telegram, Heroku logos
This entry is part 7 of 11 in the series Create your own Telegram bot with Django on Heroku

 

Django_Pony

⚠️ This article is outdated and discontinued since Heroku decided to no longer offer their free tiers as this article series suggests to use in August, 2022. Please see this post for details. ⚠️

In the previous part of this series, we started with the basics for kicking off a new Django project. We prepared our virtualenv, installed needed modules to it, created and integrated a new Heroku – project for it and learned how to work with variables in Heroku to control our application with an easy example. We also learned how to check our results locally before we publish it to our production space and how we can add an addon to our Heroku project by adding a PostgreSQL database to it.

Today, we will learn what an “app” is in Django and how to create it. Also, we will learn about and create a so-called URLconf / routing to direct specific URLs to specific parts of our code.
Continue reading “Create your own Telegram bot with Django on Heroku – Part 7 – Introducing apps and URLconf”

Create your own Telegram bot with Django on Heroku – Part 6 – Creating the Django app

Header Image showing Django, Telegram, Heroku logos
This entry is part 6 of 11 in the series Create your own Telegram bot with Django on Heroku

 

 

Django_Pony

⚠️ This article is outdated and discontinued since Heroku decided to no longer offer their free tiers as this article series suggests to use in August, 2022. Please see this post for details. ⚠️

In the previous part of this series, I tried to give you a brief yet thorough introduction to hosting your projects with Heroku.
That part was special because it was a completely optional part of this series; if you prefer to host your applications on a different platform and skipped that article, I’d like to repeat that this is completely OK and that I had shown nothing you will need for anything different but interacting with Heroku. You will hopefully notice no blank spots in the following articles. There is no need to read that article if you do not plan to use Heroku for hosting your bot. But you should be familiar enough with your hosting solution of choice to adopt the Heroku – commands I show here to an adequate setup for your hosting solution.

Today we will finally start creating our bot with Django. What we did up until now was just some kind of preparation and establishing background. In this part, we will finally start with the real stuff. ?

Continue reading “Create your own Telegram bot with Django on Heroku – Part 6 – Creating the Django app”

Create your own Telegram bot with Django on Heroku – Part 3

Header Image showing Django, Telegram, Heroku logos
This entry is part 3 of 11 in the series Create your own Telegram bot with Django on Heroku

⚠️ This article is outdated and discontinued since Heroku decided to no longer offer their free tiers as this article series suggests to use in August, 2022. Please see this post for details. ⚠️

In the previous part of this series, I explained how to register bots on Telegram, how to configure it and how to validate everything is working.

Today I will explain a bit more on how the HTTP API works, how the JSON data provided by the bots ist structured and I will introduce you to telepot, the Python module of my choice for interacting with Telegram bots using Python.

Continue reading “Create your own Telegram bot with Django on Heroku – Part 3”

Create your own Telegram bot with Django on Heroku – Part 2

Header Image showing Django, Telegram, Heroku logos
This entry is part 2 of 11 in the series Create your own Telegram bot with Django on Heroku

⚠️ This article is outdated and discontinued since Heroku decided to no longer offer their free tiers as this article series suggests to use in August, 2022. Please see this post for details. ⚠️

In the previous part of this series, I introduced the overall idea about what we are trying to achieve and what’s the goal of it.

Today I will show you how to register and prepare your Bot using the Telegram app.

Continue reading “Create your own Telegram bot with Django on Heroku – Part 2”