Django Unleashed Framework
1.46K subscribers
2.17K photos
2.58K links
Лучшие материалы по разработке на фреймворке Django на русском и английском языке

Разместить рекламу: @tproger_sales_bot

Правила общения: https://tprg.ru/rules

Другие каналы: @tproger_channels

Другие наши проекты: https://tprg.ru/media
Download Telegram
Как работают select_related и prefetch_related в Django

Часто определение разницы между select_related и prefetch_related звучит как “первый для ForeignKey полей, второй для ManyToMany”, однако это описание не раскрывает суть работы этих методов. Ниже я попробовал на примерах показать разницу между этими методами и какое влияние они оказывают на сгенерированный SQL для получения данных.

TLDR: Статья будет в первую очередь полезна тем кто начинает свое знакомство с Django, а также тем, кто использует select_related/prefetch_related в ежедневной работе, но не углублялся в глубь Django.


Читать: https://habr.com/ru/articles/752574/
Alpine.JS: A Lightweight JavaScript Framework That Packs a Mountain of Power

Introduction
In the vast landscape of JavaScript frameworks, AlpineJS emerges as a shining star that blends simplicity, speed, and versatility. While bigger frameworks like React and VueJS have their place, AlpineJS offers a refreshing alternative fo...

Read: https://nikhilakki.in/alpinejs-a-lightweight-javascript-framework-that-packs-a-mountain-of-power
👍1
Django vs Flask: What to Choose

Hello Everyone!
Welcome to my blog! I am thrilled to have you here and I hope that you will find the content both informative and engaging, Thank you for taking the time to visit my blog, I look forward to sharing my knowledge and passion with you, S...

Read: https://yssr.hashnode.dev/django-vs-flask-what-to-choose
👍1
Лучший стек для питониста-джуна 2023

Давно устоявшийся и прекрасно показывающий себя фреймворк. Постоянная поддержка, множество пакетов «из под капота», отличный ORM, хорошее распределение компонентов и простота в изучении — вот, что предлагает Django.

Да, все мы знаем, что выходят новые фреймворки, например, FastAPI, который все увереннее закрепляется на рынке, но сможет ли он похвастаться тем, что имеет Django? Например, для нормальной ORM, если вы не хотите писать напрямую SQL‑запросы конечно же, нужно будет воспользоваться sqlalchemy и alembic. В Django же все проще, создай проект и твори! Есть и плюсы FastAPI, но об этом в другой статье, не будем отходить от темы.

Так вот, есть и не такие «молодые» технологии, например, тот же Flask, тоже хорошо закрепился на рынке и стеке разработчиков, но ситуация очень похожа с FastAPI, не хватает простоты и множества удобств. Та же панель администратора — это что‑то с чем‑то, максимально полезный инструмент, который используются все при создании проектов на Django. Так же, стоит отметить приложения в Django, отличный способ разделять основные модули проекта и не ловить путаницу, опять‑таки, не все могут этим похвастаться. Не стоит и забывать об огромном комьюнити пользователей этого фреймворка, я не раз сталкивался с ошибками и практически все находил на том же Stack Overflow. Еще одна, но значительная плюшка — это неплохой перевод на русский язык.


Читать: https://habr.com/ru/articles/752652/
🔥2
Where to Deploy a Django App

This is going to be a short article by the way.
So last year Heroku stopped supporting its free tier. I only found out about this during an interview, when the interviewer brought it to my attention that none of my web apps were working😭😭😭😭😭.You...

Read: https://clementlumumba.hashnode.dev/where-to-deploy-a-django-app
1
Build, Test and Deploy A URL Shortener App with Django

Django is a popular Python Web Framework used for creating fast and efficient web applications. You will also make use of Django REST Framework - a framework used for creating APIs – to build our API.
In this extensive guide, you will:

Build a web A...

Read: https://delighto.hashnode.dev/build-test-and-deploy-a-url-shortener-app-with-django
👍1
How to Build Your Blog in Django

Introduction
Django is a high-level Python web development framework that prioritizes efficiency, security, and scalability, it is no surprise that Django in recent times has emerged among the 10 most popular web development frameworks, it follows a ...

Read: https://pwaveino.hashnode.dev/how-to-build-your-blog-in-django
👍1
Alternatives to BooleanField in Django

I hope to expand on some thoughts I have been mulling over regarding the (over)use of BooleanField in Django projects.
I rarely use BooleanField in a Django project. In nearly every case where I might be tempted to use BooleanField, a better alternat...

Read: https://jacklinke.com/alternatives-to-booleanfield-in-django
10 Must-Know Python Libraries

Introduction
Python has emerged as one of the most popular programming languages, thanks to its simplicity, versatility, and the vibrant community supporting it. Python libraries play a pivotal role in extending the language's capabilities, allowing ...

Read: https://leveluptech.hashnode.dev/10-must-know-python-libraries
👍1
Get User's Location, Country and Currency in Django

I once had to create a location-based ecommerce application with Django Web Framework as the backend. While building the project, I needed a way to display products’ prices and currency based on the current user’s location. I made some research, got ...

Read: https://delighto.hashnode.dev/user-location-country-and-currency-in-django
👍2
CORS explained using Django and Flask

Cross Origin Resource Sharing (CORS)

This is a browser mechanism that allows a website on one URL to request data from a different URL.

Certain "cross-domain" requests, notably Ajax requests, are forbidden by default by the same-origin security pol...

Read: https://rohansblog.hashnode.dev/cors-explained-using-django-and-flask
How to Build, Test and Deploy a URL Shortener with Django

Django is a popular high-level Python Web Framework used for creating fast and efficient web applications. With Django, you can focus on building your project without reinventing the wheel. It was initially released in 2005 and has now become one of ...

Read: https://delighto.hashnode.dev/build-test-deploy-url-shortener-app-with-django
DRF Serializer: Handling OrderedDict and Converting It to a Dictionary or JSON

In Django Rest Framework (DRF) tests, when you access serializer.data, you might encounter an OrderedDictinstead of a regular dictionary. This behavior is intentional and reflects the design of DRF's serialization process.

Understanding the Problem
The use of an OrderedDictensures that the order of fields in the serialized representation matches the order of fields defined in the serializer …

Read: https://djangocentral.com/drf-serializer-handling-ordereddict-and-converting-it-to-a-dictionary-or-json/
N+1 Query Problem

Introduction
Django, a high-level Python web framework, has gained widespread popularity for its robustness, flexibility, and ease of use. One of its key components is the Model Serializer, which plays a critical role in serializing and deserializing...

Read: https://rathnaviraj.hashnode.dev/n1-query-problem
Django: What, Why, and How?

Unveiling Django: What, Why, and How?
Greetings, fellas! 🌟 If you've stumbled upon this blog, you might be wondering about the magic behind web development, and let me tell you, we're about to unveil a tool that's like a magician's hat in the world ...

Read: https://imsrakesh.hashnode.dev/introduction-to-django
Django Rest Framework CheetSheet: Mastering API Development

Django Rest Framework (DRF) is a powerful toolkit that makes building robust and scalable web APIs with Django a breeze. Whether you're a seasoned Django developer or a newcomer, having a comprehensive cheat sheet at your disposal can be a game-changer. In this article, we'll delve into the most comprehensive Django Rest Framework cheat sheet, covering essential concepts, serializers, …

Read: https://djangocentral.com/django-rest-framework-cheat-sheet/
From Idea to Reality: How I’m building an online marketplace using python

I decided to start writing a series on how I use technology to approach and solve various problems. To be more precise, I will start releasing open-minded series about how I am utilizing Python and Django to create an online marketplace. I have been ...

Read: https://savviesammie.hashnode.dev/from-idea-to-reality-how-im-building-an-online-marketplace-using-python
Navigating the Database Evolution: A Beginner's Guide to Migrations in Django

Welcome to the world of Django – where your web application's journey often involves a dance with the database. In this guide, we're unraveling the mystery behind Django's migrations and uncovering why they're your best friends when it comes to manag...

Read: https://jairajremote.hashnode.dev/navigating-the-database-evolution-a-beginners-guide-to-migrations-in-django
Django's transactions: A high-level overview

Atomicity
Atomicity ensures that for a database (DB) operation with a set of queries, any evaluated query (a query that leads to the database being "touched") that raises a DatabaseError (or any of its subclasses like django.db.utils.IntegrityError) ...

Read: https://izu.hashnode.dev/djangos-transactions-a-high-level-overview
How to Use Subquery() in Django With Practical Examples

In the realm of web development, Django stands as a powerful and versatile framework for building robust applications. One of the key aspects of developing efficient and optimized web applications is handling database queries effectively. In this article, we will delve into the world of subqueries in Django, exploring their significance, practical examples of their usage, and a comparison between …

Read: https://djangocentral.com/how-to-use-subquery-in-django/