🚀 Feature Friday: Template partials!
New in Django 6.0, this extension to Django's template language makes it easy to reuse fragments in templates: Great for cutting down the overhead of creating files for small pieces of isolated logic!
🚀 Feature Friday: Template partials!
New in Django 6.0, this extension to Django's template language makes it easy to reuse fragments in templates: Great for cutting down the overhead of creating files for small pieces of isolated logic!
We're back with Feature Fridays to celebrate the 6.0 release.
Starting with... background tasks!
Django 6.0 includes a new Tasks framework for running code outside the request-response cycle. Neat for things like sending email or processing data...
Feature Friday is going on a seasonal break! We'll be back in 2025. In the meantime, if there are Django features you'd like to see covered leave a reply below ⬇️
🚀 Feature Friday: Context Processors!
If you use Django, you've likely relied on context processors before—features like auth, i18n, static files and messages all use them.
Let's learn about this simple-but-useful tool to add extra context to your Django views.
🧵 1/4
#DjangoFeatureFriday
🚀 Feature Friday: assertNumQueries!
This method from TransactionTestCase helps you write tests that verify the number of queries made by a piece of code.
It is a great way to check DB performance and catch regressions or "n+1" issues.
🧵 (1/3)
PSA: https://mastodon.social/tags/DjangoFeatureFriday
I can't be the only person on Mastodon following the #DjangoFeatureFriday hashtag?
🚀 Feature Friday: PostgreSQL Connection Pools!
This small-but-mighty change lets you enable connection pooling with a single line in your settings. This reduces the overhead of accessing your database, leading to improved performance.
🧵 (1/3)
#Django #DjangoFeatureFriday
🚀 Feature Friday: {% querystring %} !
The new {% querystring %} template tag in Django 5.1 makes it easier to access and modify the query string in your Django templates, letting you work with links that use query parameters.
🧵 (1/3)
#Django #DjangoFeatureFriday
🚀 Feature Friday: LoginRequiredMiddleware!
The LoginRequiredMiddleware is great for any Django app that is mostly behind authentication. When enabled, views will require login by default. No more login_required decorators everywhere!
🧵 (1/3)
#Django #DjangoFeatureFriday
🚀 Feature Friday: Django's update_or_create() got Smarter in v5.0!
The new create_defaults argument lets you handle creation vs update scenarios elegantly, bringing more power to Django's object management.
🧵 (1/3)
#Django #DjangoFeatureFriday