Configuring and setting up subdomains on Django using django-hosts
A subdomain is basically a domain that’s part of another main domain and it is used a lot in many websites. I spent a decent amount of time figuring out how to do that and found this very helpful post and decided to extend it a little in a tutorial f...
Read: https://migrmrz.dev/configuring-and-setting-up-subdomains-on-django-using-django-hosts
A subdomain is basically a domain that’s part of another main domain and it is used a lot in many websites. I spent a decent amount of time figuring out how to do that and found this very helpful post and decided to extend it a little in a tutorial f...
Read: https://migrmrz.dev/configuring-and-setting-up-subdomains-on-django-using-django-hosts
Как перевести Django-сайт на разные языки: плюсы, минусы, подводные камни
Рано или поздно любой сервис задумывается о расширении аудитории. И часто возникает вопрос языков, т.к. единого для всех стран не существует. В целом, это довольно стандартная задача для разработчиков, когда компания начинает работать на международную аудиторию. В случае с Django, который славится универсальностью, есть стандартное решение, но действительно ли оно хорошее, как можно его улучшить и с чем вообще придётся столкнуться во время процесса — обо всём этом расскажу. Меня зовут Камиль, я более трех лет был техническим директором и главным backend-программистом продукта Zonesmart, а с начала 2023 года продолжаю управлять разработкой этого продукта уже в составе Kokoc Group.
Читать: https://habr.com/ru/companies/kokocgroup/articles/796829/
Рано или поздно любой сервис задумывается о расширении аудитории. И часто возникает вопрос языков, т.к. единого для всех стран не существует. В целом, это довольно стандартная задача для разработчиков, когда компания начинает работать на международную аудиторию. В случае с Django, который славится универсальностью, есть стандартное решение, но действительно ли оно хорошее, как можно его улучшить и с чем вообще придётся столкнуться во время процесса — обо всём этом расскажу. Меня зовут Камиль, я более трех лет был техническим директором и главным backend-программистом продукта Zonesmart, а с начала 2023 года продолжаю управлять разработкой этого продукта уже в составе Kokoc Group.
Читать: https://habr.com/ru/companies/kokocgroup/articles/796829/
👍1
Некоторые антипаттерны проектирования в Django
Привет, Хабр!
В Джанге существует множество глубоко укоренившиеся привычек, которые кажутся правильными на первый взгляд, но в долгосрочной перспективе приводят к серьезным проблемам в производительности, масштабируемости и безопасности проекта. Эти решения могут казаться удобными костылями или временными фиксами, но на самом деле они создают технический долг, который со временем будет только расти, усложняя все с каждым разом.
Умение избегать этих привычек – это основополагающие элементы компетентности, гарантирующие, что проекты будут не только удобными для пользователя, но и устойчивыми к проблемам.
Читать: https://habr.com/ru/companies/otus/articles/796735/
Привет, Хабр!
В Джанге существует множество глубоко укоренившиеся привычек, которые кажутся правильными на первый взгляд, но в долгосрочной перспективе приводят к серьезным проблемам в производительности, масштабируемости и безопасности проекта. Эти решения могут казаться удобными костылями или временными фиксами, но на самом деле они создают технический долг, который со временем будет только расти, усложняя все с каждым разом.
Умение избегать этих привычек – это основополагающие элементы компетентности, гарантирующие, что проекты будут не только удобными для пользователя, но и устойчивыми к проблемам.
Читать: https://habr.com/ru/companies/otus/articles/796735/
Getting Started on how to use the Python Framework Django (Part 1)
Overview
This article will explain how to download and use the Python Django Framework to create a sample application from the official Django documentation (1).
Materials
Python
Python Packages Needed: Django
Downloading Django
To use Django, it...
Read: https://andrewdass.hashnode.dev/getting-started-on-how-to-use-the-python-framework-django-part-1
Overview
This article will explain how to download and use the Python Django Framework to create a sample application from the official Django documentation (1).
Materials
Python
Python Packages Needed: Django
Downloading Django
To use Django, it...
Read: https://andrewdass.hashnode.dev/getting-started-on-how-to-use-the-python-framework-django-part-1
Coming soon - How to create a SaaS boilerplate written in Django and React
Finally finished my SaaS boilerplate written in Django and React! Check it out here: https://boilerplate.rcmisk.com
I realized when I had an idea for a SaaS or business I kept creating the same basic features, login/register, user management, JWT tok...
Read: https://rcmisk.com/coming-soon-how-to-create-a-saas-boilerplate-written-in-django-and-react
Finally finished my SaaS boilerplate written in Django and React! Check it out here: https://boilerplate.rcmisk.com
I realized when I had an idea for a SaaS or business I kept creating the same basic features, login/register, user management, JWT tok...
Read: https://rcmisk.com/coming-soon-how-to-create-a-saas-boilerplate-written-in-django-and-react
Лучший стек для питониста-джуна 2024 (2 часть)
Итак, что же поменялось за чуточку больше чем полгода? Если мы будем говорить об актуальности - ничего. Django до сих пор, а скорее всего так будет и всегда, остается "на плаву". Большая часть вакансий для back-end разработчика на Python имеет в себе требования по знаниям Django. Говорить вечно о том, что он удобен, постоянно поддерживаем, дает довольно обширный функционал и так далее - бессмысленно. Все основные моменты я упомянул в первой части.
Ладно, вступление в сторону! Лучше обсудить то, что изменилось с Django за это время.
Самое грандиозное из этого - выход Django 5! По сути скачок на пятую версию не принес в фреймворк особо крупных изменений, но парочку моментов хочу подчеркнуть. Первое и самое важное, на мой взгляд, это то, что разработчики решили добавить больше асинхронности без подключения таск-менеджеров. Для этого они добавили несколько декораторов и методов. Хотя это немного, на мой взгляд, противоречит самому принципу работы Django (напоминаю: Django синхронный фреймворк и для того, чтобы сделать очередь задач, нужно подключать таск-менеджеры, например, Celery), но тем не менее, это все равно крутой шаг в эволюцию. Надеюсь, что разработчики и дальше будут двигаться в этом направлении.
Далее, не могу не упомянуть очень важный момент - совместимость с Python. Django 5 будет работать только с версиями Python 3.10 и выше. Django 4.2.x - последняя версия, которая работает с Python 3.8 и 3.9.
Остальное я могу отнести в одну кучу: добавление фасетных фильтров в админке, упрощение шаблонов для отрисовки полей формы, прикольная, на мой взгляд, функция для значений по умолчанию, вычисленных базой данных, и еще пару приколюх с БД. Все остальное и более подробно вы сможете почитать в официальной документации. Я же не буду все разжевывать, так как отойду от темы статьи.
Смотреть польностью
Читать: https://habr.com/ru/articles/797209/
Итак, что же поменялось за чуточку больше чем полгода? Если мы будем говорить об актуальности - ничего. Django до сих пор, а скорее всего так будет и всегда, остается "на плаву". Большая часть вакансий для back-end разработчика на Python имеет в себе требования по знаниям Django. Говорить вечно о том, что он удобен, постоянно поддерживаем, дает довольно обширный функционал и так далее - бессмысленно. Все основные моменты я упомянул в первой части.
Ладно, вступление в сторону! Лучше обсудить то, что изменилось с Django за это время.
Самое грандиозное из этого - выход Django 5! По сути скачок на пятую версию не принес в фреймворк особо крупных изменений, но парочку моментов хочу подчеркнуть. Первое и самое важное, на мой взгляд, это то, что разработчики решили добавить больше асинхронности без подключения таск-менеджеров. Для этого они добавили несколько декораторов и методов. Хотя это немного, на мой взгляд, противоречит самому принципу работы Django (напоминаю: Django синхронный фреймворк и для того, чтобы сделать очередь задач, нужно подключать таск-менеджеры, например, Celery), но тем не менее, это все равно крутой шаг в эволюцию. Надеюсь, что разработчики и дальше будут двигаться в этом направлении.
Далее, не могу не упомянуть очень важный момент - совместимость с Python. Django 5 будет работать только с версиями Python 3.10 и выше. Django 4.2.x - последняя версия, которая работает с Python 3.8 и 3.9.
Остальное я могу отнести в одну кучу: добавление фасетных фильтров в админке, упрощение шаблонов для отрисовки полей формы, прикольная, на мой взгляд, функция для значений по умолчанию, вычисленных базой данных, и еще пару приколюх с БД. Все остальное и более подробно вы сможете почитать в официальной документации. Я же не буду все разжевывать, так как отойду от темы статьи.
Смотреть польностью
Читать: https://habr.com/ru/articles/797209/
👍2
Django Project on NGINX Unit
Read: https://djangotricks.blogspot.com/2024/02/django-project-on-nginx-unit.html
Read: https://djangotricks.blogspot.com/2024/02/django-project-on-nginx-unit.html
Django for Beginners: Build websites with Python and Django
Embarking on the journey to learn Django as a beginner may initially seem daunting, given its robust framework and the intricacies of web development. However, the experience can be transformed into an exciting and manageable endeavor with the aid of...
Read: https://pyquinn.hashnode.dev/django-for-beginners-build-websites-with-python-and-django
Embarking on the journey to learn Django as a beginner may initially seem daunting, given its robust framework and the intricacies of web development. However, the experience can be transformed into an exciting and manageable endeavor with the aid of...
Read: https://pyquinn.hashnode.dev/django-for-beginners-build-websites-with-python-and-django
👍1
Web Programming with Django - An Introduction
Introduction
Building a website using HTML and CSS is pretty trivial. Just build a structure implement some styling and voila. But a website or a webpage built using just HTML and CSS is a static web page i.e., Every time a user visits a page it will...
Read: https://akshayparihar.hashnode.dev/introtowebprogrammingwithdjango
Introduction
Building a website using HTML and CSS is pretty trivial. Just build a structure implement some styling and voila. But a website or a webpage built using just HTML and CSS is a static web page i.e., Every time a user visits a page it will...
Read: https://akshayparihar.hashnode.dev/introtowebprogrammingwithdjango
Django security releases issued: 5.0.3, 4.2.11, and 3.2.25
In accordance with our security release policy, the Django team
is issuing Django 5.0.3, Django 4.2.11, and Django 3.2.25.
These releases addresses the security issue detailed below. We encourage all
users of Django to upgrade as soon as possible.
CVE-2024-27351: Potential regular expression denial-of-service in django.utils.text.Truncator.words()
django.utils.text.Truncator.words() method (with html=True) and truncatewords_html template filter were subject to a potential
regular expression denial-of-service attack using a suitably crafted string
(follow up to CVE-2019-14232 and CVE-2023-43665).
Thanks Seokchan Yoon for the report.
This issue has severity "moderate" according to the Django security policy.
Affected supported versions
* Django 5.0
* Django 4.2
* Django 3.2
Resolution
Patches to resolve the issue have been applied to the 5.0, 4.2, and 3.2
release branches. The patches may be obtained from the following changesets:
* On the 5.0 release branch
* On the 4.2 release branch
* On the 3.2 release branch
The following releases have been issued:
* Django 5.0.3 (download Django 5.0.3 | 5.0.3 checksums)
* Django 4.2.11 (download Django 4.2.11 | 4.2.11 checksums)
* Django 3.2.25 (download Django 3.2.25 | 3.2.25 checksums)
The PGP key ID used for this release is Mariusz Felisiak: 2EF56372BA48CD1B.
General notes regarding security reporting
As always, we ask that potential security issues be reported via
private email to [email protected], and not via Django's
Trac instance or the django-developers list. Please see our security
policies for further
information.
Read: https://www.djangoproject.com/weblog/2024/mar/04/security-releases/
In accordance with our security release policy, the Django team
is issuing Django 5.0.3, Django 4.2.11, and Django 3.2.25.
These releases addresses the security issue detailed below. We encourage all
users of Django to upgrade as soon as possible.
CVE-2024-27351: Potential regular expression denial-of-service in django.utils.text.Truncator.words()
django.utils.text.Truncator.words() method (with html=True) and truncatewords_html template filter were subject to a potential
regular expression denial-of-service attack using a suitably crafted string
(follow up to CVE-2019-14232 and CVE-2023-43665).
Thanks Seokchan Yoon for the report.
This issue has severity "moderate" according to the Django security policy.
Affected supported versions
* Django 5.0
* Django 4.2
* Django 3.2
Resolution
Patches to resolve the issue have been applied to the 5.0, 4.2, and 3.2
release branches. The patches may be obtained from the following changesets:
* On the 5.0 release branch
* On the 4.2 release branch
* On the 3.2 release branch
The following releases have been issued:
* Django 5.0.3 (download Django 5.0.3 | 5.0.3 checksums)
* Django 4.2.11 (download Django 4.2.11 | 4.2.11 checksums)
* Django 3.2.25 (download Django 3.2.25 | 3.2.25 checksums)
The PGP key ID used for this release is Mariusz Felisiak: 2EF56372BA48CD1B.
General notes regarding security reporting
As always, we ask that potential security issues be reported via
private email to [email protected], and not via Django's
Trac instance or the django-developers list. Please see our security
policies for further
information.
Read: https://www.djangoproject.com/weblog/2024/mar/04/security-releases/
Мульти-тенант в Django
Привет, Хабр!
Мульти-тенант (multi-tenancy) — это подход, который позволяет одному экземпляру приложения обслуживать множество клиентов или арендаторов (тенатов). Каждый арендатор изолирован от других, имея возможность кастомизации под свои нужды, при этом основной кодовой базой и инфраструктурой делится между всеми.
Когда применять эту замечательную концепцию? Если говорить простыми словами, то мульти-тенант подход наиболее ценен для SaaS-продуктов, когда одно и то же приложение предоставляется разным клиентам, и каждый клиент работает со своим набором данных. Все это серьезно экономит ресурсы на обслуживание инфраструктуры, тк все изменения вносятся централизованно и мгновенно становятся доступны всем клиентам.
В Django мульти-тенант реализовывается довольно часто и для этого есть библиотека django-multitenant.
Читать: https://habr.com/ru/companies/otus/articles/797003/
@django_prog
Привет, Хабр!
Мульти-тенант (multi-tenancy) — это подход, который позволяет одному экземпляру приложения обслуживать множество клиентов или арендаторов (тенатов). Каждый арендатор изолирован от других, имея возможность кастомизации под свои нужды, при этом основной кодовой базой и инфраструктурой делится между всеми.
Когда применять эту замечательную концепцию? Если говорить простыми словами, то мульти-тенант подход наиболее ценен для SaaS-продуктов, когда одно и то же приложение предоставляется разным клиентам, и каждый клиент работает со своим набором данных. Все это серьезно экономит ресурсы на обслуживание инфраструктуры, тк все изменения вносятся централизованно и мгновенно становятся доступны всем клиентам.
В Django мульти-тенант реализовывается довольно часто и для этого есть библиотека django-multitenant.
Читать: https://habr.com/ru/companies/otus/articles/797003/
@django_prog
My Wonderful Journey Through The Open Source World
When I started my CS journey, Open Source was something that immediately got my attention. It had everything that attracted me to the field: passionate developers working together as a community to build something wonderful. Ever since then, I've bee...
Read: https://neerajpy.hashnode.dev/my-wonderful-journey-through-the-open-source-world
@django_prog
When I started my CS journey, Open Source was something that immediately got my attention. It had everything that attracted me to the field: passionate developers working together as a community to build something wonderful. Ever since then, I've bee...
Read: https://neerajpy.hashnode.dev/my-wonderful-journey-through-the-open-source-world
@django_prog
Update a Django Primary Key to UUID
This is a tricky operation, especially if other models have a foreign key to the target model. A short example:
from django.db import models
class Author(models.Model):
name = models.CharField(max_length=255)
class Book(models.Model):
title...
Read: https://tomhuibregtse.com/update-a-django-primary-key-to-uuid
@django_prog
This is a tricky operation, especially if other models have a foreign key to the target model. A short example:
from django.db import models
class Author(models.Model):
name = models.CharField(max_length=255)
class Book(models.Model):
title...
Read: https://tomhuibregtse.com/update-a-django-primary-key-to-uuid
@django_prog
👍2
Redirect to the previous page after login in Django
Django implements numerous features to simplify your development experience. In this article, I want to demonstrate a simple behavior that you may find useful: redirecting the user to the exact page they were on before the login action. This could he...
Read: https://raffaellascode.hashnode.dev/redirect-to-the-previous-page-after-login-in-django
@django_prog
Django implements numerous features to simplify your development experience. In this article, I want to demonstrate a simple behavior that you may find useful: redirecting the user to the exact page they were on before the login action. This could he...
Read: https://raffaellascode.hashnode.dev/redirect-to-the-previous-page-after-login-in-django
@django_prog
👍1
How to Set Up a Django and React SaaS Boilerplate: A Step-by-Step Guide
Starting a Software as a Service (SaaS) project can be daunting, especially with the initial setup of the infrastructure. Luckily, with the right boilerplate, much of the groundwork is laid out for you. This guide will walk you through setting up a S...
Read: https://rcmisk.com/how-to-set-up-a-django-and-react-saas-boilerplate-a-step-by-step-guide
@django_prog
Starting a Software as a Service (SaaS) project can be daunting, especially with the initial setup of the infrastructure. Luckily, with the right boilerplate, much of the groundwork is laid out for you. This guide will walk you through setting up a S...
Read: https://rcmisk.com/how-to-set-up-a-django-and-react-saas-boilerplate-a-step-by-step-guide
@django_prog
Day 68 - Scaling with Terraform
Yesterday, we delved into the realm of AWS S3 Bucket creation with Terraform. Today, buckle up as we explore the art of scaling our infrastructure with Terraform's magical touch!
Understanding Scaling
Scaling is like a symphony conductor, orchestrati...
Read: https://davender.hashnode.dev/day-68-scaling-with-terraform
@django_prog
Yesterday, we delved into the realm of AWS S3 Bucket creation with Terraform. Today, buckle up as we explore the art of scaling our infrastructure with Terraform's magical touch!
Understanding Scaling
Scaling is like a symphony conductor, orchestrati...
Read: https://davender.hashnode.dev/day-68-scaling-with-terraform
@django_prog
Django REST Framework : Part 1
DRF is an essential toolkit that empowers Django developers to create powerful and well-structured web APIs (Application Programming Interfaces). These APIs act as the bridge, enabling your applications to seamlessly ...
Read: https://aghattikar82.hashnode.dev/django-rest-framework-part-1
@django_prog
DRF is an essential toolkit that empowers Django developers to create powerful and well-structured web APIs (Application Programming Interfaces). These APIs act as the bridge, enabling your applications to seamlessly ...
Read: https://aghattikar82.hashnode.dev/django-rest-framework-part-1
@django_prog
Django REST Framework : Part 2
Video ContainsIntroductionWhat is APIWhy do we use Django rest framework.
Read: https://aghattikar82.hashnode.dev/django-rest-framework-part-2
@django_prog
Video ContainsIntroductionWhat is APIWhy do we use Django rest framework.
Read: https://aghattikar82.hashnode.dev/django-rest-framework-part-2
@django_prog
Can Django be combined with React ?
Introduction
Django is a high-level Python framework used for back-end services, while React is a top JavaScript framework used to design user interfaces (UIs). Combining these two frameworks will result in a website with a highly robust, scalable, a...
Read: https://rupard.hashnode.dev/can-django-be-combined-with-react
@django_prog
Introduction
Django is a high-level Python framework used for back-end services, while React is a top JavaScript framework used to design user interfaces (UIs). Combining these two frameworks will result in a website with a highly robust, scalable, a...
Read: https://rupard.hashnode.dev/can-django-be-combined-with-react
@django_prog
Django admin: How to add a custom page?
Django admin is a powerful tool to build admin panels rapidly. With just a few lines of code, you can have a fully functional admin panel in seconds.
The problem though is customization, one of the most common customizations you'll do often is add a ...
Read: https://kevincoder.co.za/django-admin-how-to-add-a-custom-page
@django_prog
Django admin is a powerful tool to build admin panels rapidly. With just a few lines of code, you can have a fully functional admin panel in seconds.
The problem though is customization, one of the most common customizations you'll do often is add a ...
Read: https://kevincoder.co.za/django-admin-how-to-add-a-custom-page
@django_prog
Web Programming with Django - Going Live with your Web App
Overview
In my previous blog, I taught you how you can get started with Django, How to create a Project and an App and set up its configurations.
But it won't be worth it if you keep typing and can't even see the results, whether your app is working ...
Read: https://akshayparihar.hashnode.dev/web-programming-with-django-going-live-with-your-web-app
@django_prog
Overview
In my previous blog, I taught you how you can get started with Django, How to create a Project and an App and set up its configurations.
But it won't be worth it if you keep typing and can't even see the results, whether your app is working ...
Read: https://akshayparihar.hashnode.dev/web-programming-with-django-going-live-with-your-web-app
@django_prog