Django-Crontab - Collecting Data with Scheduled Functions in Django

Аватар автора
JS Уроки для Начинающих
In this video, we will use django-crontab package to collect cryptocurrency data from an API every minute, and store that data in the database. django-crontab allows you to schedule functions - schedules can be as flexible as you like, for example "every minute", "every day at midnight", "every Sunday at 4pm" etc. We will use Docker in this video, as django-crontab does not work on Windows systems. We&also use django-environ to read in sensitive environment variables (i.e. the API key), and use HTMX polling to display our real-time updates on the web page without a refresh. Data will be collected every minute with our django-crontab function, stored in the database, and displayed on the webpage with HTMX polling for automatic updates every time the cronjob runs. ☕️ ??? ?? ? ??????: To support the channel and encourage new videos, please consider buying me a coffee here: ? ????????: 00:00 Intro 01:18 Setup 02:46 Docker Overview 04:45 Using django-environ to add settings 06:14 Starting django app using docker 07:21 Testing API with Django shell 11:00 Creating database models 13:13 Creating django-crontab function 18:40 Adding cronjobs settings 23:55 Displaying price data on page 25:53 Adding HTMX polling for data updates 31:32 crontab.guru for cron expressions ?????? ?????: ? ??????? ??????? ??? ???????????: #htmx

0/0


0/0

0/0

0/0

Скачать популярное видео

Популярное видео

0/0