What's new in Django community blogs?

Djangonaut Space - New session 2024

Sept. 6, 2024 » The Django weblog » [Archived Version]

We are thrilled to announce that Djangonaut Space, a mentorship program, is open for applicants for our next cohort! Djangonaut Space is holding a third session this year! This session will start on October 14th, 2024. We are accepting applications until September 14th, 2024. More details can be found in the website. Djangonaut Space is a free, 8-week group mentoring program where individuals will work self-paced in a semi-structured learning environment. It seeks to help members of the communi…

Read More

django-filter: filtering a foreign key model property

Sept. 6, 2024 » Valentino Gagliardi - Django RSS Feed » [Archived Version]

How to filter a foreign key model property with django-filter.

Read More

Django News - Django security releases issued: 5.1.1, 5.0.9, and 4.2.16 - Sep 6th 2024

Sept. 6, 2024 » Django News » [Archived Version]

News Django security releases issued: 5.1.1, 5.0.9, and 4.2.16 Two security fixes were just released. As always, the best security measure you can take is to always be on the latest version of Django. djangoproject.com Announcing Djangonaut Space Session 3 Applications Open! Session 3 applications are now open until September 14th. djangonaut.space Sponsored Link 1 Try Scout APM for free! Sick of…

Read More

Django: a pattern for settings-configured API clients

Sept. 4, 2024 » Adam Johnson » [Archived Version]

Here’s an example of a common pattern in Django projects: from acme.api import APIClient from django.conf import settings acme_client = APIClient(api_key=settings.ACME_API_KEY) def order_anvil() -> None: acme_client.anvils.order(...) An API client is instantiated as a module-level variable based on some settings. This approach has some drawbacks …

Read More

Robust Full-Stack Authentication with Django Allauth, React, and React Router

Sept. 4, 2024 » Josh Karamuth » [Archived Version]

Learn how to integrate django-allauth with React for a powerful and easy authentication system.

Read More

Django: build a Microsoft Teams bot

Sept. 3, 2024 » Adam Johnson » [Archived Version]

Recently, I built a Microsoft Teams bot for a client, inside their Django project. It wasn’t fun or easy, but the experience did increase my resiliency as a developer. I also went into this forewarned by my wife, a product manager also known as “the integration queen”, who has …

Read More

Django security releases issued: 5.1.1, 5.0.9, and 4.2.16

Sept. 3, 2024 » The Django weblog » [Archived Version]

In accordance with our security release policy, the Django team is issuing releases for Django 5.1.1, Django 5.0.9, and Django 4.2.16. These releases address the security issues detailed below. We encourage all users of Django to upgrade as soon as possible. CVE-2024-45230: Potential denial-of-service vulnerability in django.utils.html.urlize() urlize and urlizetrunc were subject to a potential denial-of-service attack via very large inputs with a specific sequence of characters. Thanks to MPr…

Read More

Using Django Allauth without Username Field

Sept. 1, 2024 » Josh Karamuth » [Archived Version]

Learn how to use Django Allauth without a username field in your User model.

Read More

Django: avoid “useless use of .all()”

Aug. 30, 2024 » Adam Johnson » [Archived Version]

Here’s a little ORM pet peeve of mine that may deepen your understanding of how QuerySets work. Take this code: Digger.objects.all().filter(height_cm__gt=200) The .all() is unnecessary. It’s equivalent to write: Digger.objects.filter(height_cm__gt=200) Why? The manager, Digger.objects, already refers to …

Read More

Django: rotate your secret key, fast or slow

Aug. 30, 2024 » Adam Johnson » [Archived Version]

Django’s SECRET_KEY setting is used for cryptographic signing in various places, such as for session storage and password reset tokens. This makes keeping it secure a high priority since an attacker with the key could forge things like password reset tokens. If you have leaked your secret key, you …

Read More