Telegram Group & Telegram Channel
5 распространённых ошибок в Django

1️⃣ Вы не используете select_related и prefetch_related для FK и M2M запросов
Ошибка: Неоптимизированные запросы к базе данных при работе с внешними ключами и многими ко многим, что приводит к неэффективным запросам (проблема N+1).

2️⃣ Недооценка возможностей Django Admin
Ошибка: Недостаточное использование мощных функций интерфейса администрирования Django.

3️⃣ Обращение с QuerySets как с обычными списками
Ошибка: Неправильное понимание работы QuerySets, что приводит к лишним запросам к базе данных.

4️⃣ Неверное обслуживание статических и медиа-файлов
Ошибка: Использование Django для обслуживания статических и медиа-файлов в продакшене.

5️⃣ Использование `.all() с большими или неупорядоченными наборами данных
Ошибка: Использование .all() на моделях без дефолтного порядка или с большими наборами данных, что приводит к проблемам с производительностью.



tg-me.com/Django_pythonl/331
Create:
Last Update:

5 распространённых ошибок в Django

1️⃣ Вы не используете select_related и prefetch_related для FK и M2M запросов
Ошибка: Неоптимизированные запросы к базе данных при работе с внешними ключами и многими ко многим, что приводит к неэффективным запросам (проблема N+1).

2️⃣ Недооценка возможностей Django Admin
Ошибка: Недостаточное использование мощных функций интерфейса администрирования Django.

3️⃣ Обращение с QuerySets как с обычными списками
Ошибка: Неправильное понимание работы QuerySets, что приводит к лишним запросам к базе данных.

4️⃣ Неверное обслуживание статических и медиа-файлов
Ошибка: Использование Django для обслуживания статических и медиа-файлов в продакшене.

5️⃣ Использование `.all() с большими или неупорядоченными наборами данных
Ошибка: Использование .all() на моделях без дефолтного порядка или с большими наборами данных, что приводит к проблемам с производительностью.

BY Django Python








Share with your friend now:
tg-me.com/Django_pythonl/331

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Spiking bond yields driving sharp losses in tech stocks

A spike in interest rates since the start of the year has accelerated a rotation out of high-growth technology stocks and into value stocks poised to benefit from a reopening of the economy. The Nasdaq has fallen more than 10% over the past month as the Dow has soared to record highs, with a spike in the 10-year US Treasury yield acting as the main catalyst. It recently surged to a cycle high of more than 1.60% after starting the year below 1%. But according to Jim Paulsen, the Leuthold Group's chief investment strategist, rising interest rates do not represent a long-term threat to the stock market. Paulsen expects the 10-year yield to cross 2% by the end of the year. A spike in interest rates and its impact on the stock market depends on the economic backdrop, according to Paulsen. Rising interest rates amid a strengthening economy "may prove no challenge at all for stocks," Paulsen said.

Should I buy bitcoin?

“To the extent it is used I fear it’s often for illicit finance. It’s an extremely inefficient way of conducting transactions, and the amount of energy that’s consumed in processing those transactions is staggering,” the former Fed chairwoman said. Yellen’s comments have been cited as a reason for bitcoin’s recent losses. However, Yellen’s assessment of bitcoin as a inefficient medium of exchange is an important point and one that has already been raised in the past by bitcoin bulls. Using a volatile asset in exchange for goods and services makes little sense if the asset can tumble 10% in a day, or surge 80% over the course of a two months as bitcoin has done in 2021, critics argue. To put a finer point on it, over the past 12 months bitcoin has registered 8 corrections, defined as a decline from a recent peak of at least 10% but not more than 20%, and two bear markets, which are defined as falls of 20% or more, according to Dow Jones Market Data.

telegram from vn


Telegram Django Python
FROM USA