Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
19X faster response time
At Lincoln Loop, we don’t just build web platforms from scratch and scale them to accommodate growing demand; we also dedicate ourselves to their long-term maintenance. Some of our partnerships have spanned over a decade. Let me walk you through a performance optimization journey we undertook with a large publishing platform, which serves hundreds of thousands to millions of page views daily. The Issue at Hand Over the lifespan of a platform, various infrastructure changes and design tweaks can inadvertently impact the response time. For instance, adding more content to a page or changing the ordering of the results might bog it down. Continuous monitoring is critical because it allows us to spot such regressions quickly. A live website’s behavior varies significantly from local testing. Production sites deal with multiple cache layers and handle countless concurrent requests. In contrast, during “local” development, you typically turn off these cache layers and test one endpoint at a time. Thus, when embarking on performance optimization, always base your strategy on metrics from your production environment and tackle one modification at a time. For this optimization, I utilized AWS CloudWatch for response time metrics on the load balancer and some data from Sentry’s performance … -
Team size isn't a measure of success
Most managers have internalized the idea that team growth, in and of itself, is a unalloyed good, and a sign of success. This is wrong, but it’s understandable. Team growth feels like success, but headcount by itself isn’t a measure of success. Instead, we should judge management success by impact and efficiency. -
Django News - 2023 Django Developers Survey - Sep 8th 2023
News 2023 Django Developers Survey The DSF is partnering with JetBrains to run the 2023 Django Developers Survey. The survey is an essential metric of Django usage and helps guide future technical and community decisions and is open until October 1st, 2023, Anywhere on Earth (AoE). djangoproject.com Django security releases issued: 4.2.5, 4.1.11, and 3.2.21 These security releases address a potential denial of service vulnerability. We encourage all users of Django to upgrade as soon as possible. djangoproject.com Python Release Python 3.12.0rc2 Python 3.12.0rc2 is the last release preview for Python 3.12, scheduled for Monday, October 2nd, 2023. Now is an excellent time to start testing your applications and third-party libraries on Python 3.12 to ensure you are ready for the official release. python.org Last call for DjangoCon US Hotel Reservations DjangoCon US's discounted hotel rooms close on September 15th or as soon as they are gone. Please book today if you plan on attending in person this year. djangoproject.com Updates to Django Last week we had 12 pull requests merged into Django by 10 different contributors - including 2 first time contributors! Congratulations to Gnomeek and John Whitman for having their first commits merged into Django - welcome onboard! … -
SendGrid Inbound - Building SaaS #170
In this episode, we worked on the inbound hook to receive email responses from SendGrid using the service’s Inbound Parse feature. We worked through the configuration and addressed the security concerns with opening up a public webhook. -
SendGrid Inbound - Building SaaS with Python and Django #170
In this episode, we worked on the inbound hook to receive email responses from SendGrid using the service’s Inbound Parse feature. We worked through the configuration and addressed the security concerns with opening up a public webhook. -
Add robots.txt to a Django website
A "bot" is a general term for an automated program that does things like crawl the web. Google and other search engines rely on bots to periodically crawl the internet. … -
Django News - Python CVE Program - Sep 1st 2023
News The PSF has been authorized by the CVE Program as a CVE Numbering Authority (CNA) The Python Software Foundation is now a CVE Numbering Authority (CNA), enhancing the security response process for key Python projects, ensuring quicker CVE ID allocations, and offering consistent vulnerability disclosures led by their dedicated security team. blogspot.com Djangonaut Space Interest Form If you'd like to join or mentor the Djangonaut Space Contributor Program, here's how you can express your interest. google.com Wagtail CMS Results of the 2023 Wagtail Deployment Survey The results of the Wagtail Deployment Survey are here. wagtail.org Sponsored Link Sick of performance issues? Enter Scout's APM tool for Python apps. Easily pinpoint and fix slowdowns with intelligent tracing logic. Optimize performance hassle-free, delighting your users. Try us out for free! ter.li Articles How to create a Django form (using HTMX) in 90 seconds 🐎 Minimise javascript. Maximise building speed with Django and HTMX. photondesigner.com Klaviyo - Powering our APIs using *attr*active DTOs Klaviyo provides marketing automation and is built with Django. This post covers creating a company-wide API with over 150 endpoints spanning 12 product areas, processing millions of requests daily. klaviyo.tech Docker-compose autoheal: case sensitivity A common pitfall when using … -
Neomodel: Python OGM for Neo4j Extends Version Support and Moves to Neo4j Labs
We’re excited to announce that neomodel, the Python OGM (Object-Graph Mapping) library, has officially moved to the Neo4j Labs program and now supports Neo4j version 5.This development brings a host of advantages and opportunities for both the neomodel community and Neo4j users alike. In this post, we’ll cover what value this brings to the library and implies for its future.A Community-Focused LibraryNeo4j Labs is a means for exploring new technologies with Neo4j with open-source projects. It focuses on projects that see interest and adoption and manages expectations and a minimum level of quality. Many important product developments had their origins in Neo4j Labs like graph data science, the GraphQL library, the Kafka and Spark integrations, and APOC core.Neo4j Labs - Neo4j LabsLike the other Neo4j Labs projects, neomodel remains an open-source, and completely community-driven library.Joining the Neo4j Labs program implies the following:Clear expectations: Labs projects are experimental and not officially product-supported, although some of them (like NeoDash, neosemantics, and neomodel) have available Neo4j Services packages for development and support.Quality standards: To be part of Labs, you need to adhere to certain minimal quality standards, which ensures enhanced code quality (unit and integration testing), security checks, automated tooling (CI/CD), etc…Releases and … -
Docker-compose autoheal: case sensitivity
I use docker-compose quite a lot. Most of the python/django stuff we deploy is done with docker-compose (one of the two big ones is in kubernetes already). A while back I moved several "geoservers" to docker-compose. Geoserver is a web mapping server written with java/tomcat. Normally pretty stable, but you can get it to crash or to become unresponsive. So that's something for which docker's health check comes in handy. You can configure it in docker-compose itself, but I put it in our geoserver's custom Dockerfile as I was making some other modifications anyway: FROM docker.osgeo.org/geoserver:2.23.1 ... some unrelated customizations ... HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=150s \ CMD curl --fail --max-time 3 http://localhost:8080/geoserver/web/ || exit 1 A simple "curl" command to see if the geoserver still displays its start page. With a generous --start-period as geoserver needs quite some time to start up. Docker-compose allows for healthchecks, and displays Up (healthy) in the "state" column when you call docker-compose ps. But docker-compose doesn't actually restart failed services. For that, you need docker-autoheal as an extra service. At the core, it consists of a single shell script that asks docker if there are containers matching the filter health=unhealthy and optionally autoheal=true. … -
Django News - Professional Djangonaut skills - Aug 25th 2023
News Python 3.11.5, 3.10.13, 3.9.18, and 3.8.18 is now available The latest Python versions, including a security release. blogspot.com Updates to Django During summer holidays we still had 4 pull requests merged into Django by 2 different contributors - including 1 first time contributor! Congratulations to jualvarez for having their first commit merged into Django - welcome on board! This week, we have some great opportunities for you to give back to Django! Are you a Windows user and have some time to help investigate a ticket? We need a little help investigating runserver: https://code.djangoproject.com/ticket/34787 Or perhaps you speak multiple languages and can help to translate djangogirls.org? You can contribute via this link: https://poeditor.com/join/project/n5I3liMVyj There's a lot of exciting work going on in the community currently! Giving back to Django has been truly an enriching experience for me and I hope you have the opportunity to raise your hand and make great new friends across the framework. 💚 Django Newsletter Sponsored Link Sick of performance issues? Enter Scout's APM tool for Python apps. Easily pinpoint and fix slowdowns with intelligent tracing logic. Optimize performance hassle-free, delighting your users. Try us out for free! ter.li Articles Professional Djangonaut skills · Better … -
Mailbag: Should you give candidates feedback on their interview performance?
Should you give unsuccessful job candidates feedback on what they did or didn’t get right? -
Customizing the Django Admin
In this article, we'll look at how to customize Django's admin site. -
SendGrid Outbound - Building SaaS #169
In this episode, we took another step closer to deploying the service online. The primary goal was to make sure that email sending works. I spent a lot of time explaining email configuration and showing exactly how to wire up SendGrid to Cloudflare to do Domain Authentication that permits email sending from the service’s domain (journeyinbox.com). -
Do I need a consultant, contractor or employee?
When is it the right choice to hire full-time staff, and when should you use consultants or contractors instead? The short answer: hire consultants for guidance, contractors for execution, and employees for stability and flexibility. For the long answer, read this article. -
SendGrid Outbound - Building SaaS with Python and Django #169
In this episode, we took another step closer to deploying the service online. The primary goal was to make sure that email sending works. I spent a lot of time explaining email configuration and showing exactly how to wire up SendGrid to Cloudflare to do Domain Authentication that permits email sending from the service’s domain (journeyinbox.com). -
Django Dependency Management with pip-compile and pip-tools
Even a basic Django project has multiple dependencies. After installing Django itself, various third-party packages--and their dependencies!--must be installed and managed. How do you track version numbers in a reproducible … -
pre-commit with Django
[pre-commit](https://pre-commit.com/) is a widely-used code quality framework. It allows a developer to add [hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for various code quality tools that check your code for any errors or issues _before_ committing … -
My reaction to the block-driven CMS blog post
My reaction to the block-driven CMS blog post This morning I read an interesting post on the Lincoln Loop blog called Building a Future-Proof Platform with Block-Driven CMS. It shouldn’t come as a surprise to those (few 😄) who know my work in the area of content management systems that the post resonated with me. I found the description of the advantages of block-based CMS editing very clear and I like the emphasis on structuring data well so that it can be reused for multiple distribution channels. Of course django CMS isn’t the only way to implement a block-driven CMS using Django. Since its inception FeinCMS was always the smaller, faster and nimbler counterpart to it, achieving the same basic goals with a fraction of the code and maintenance headaches. django CMS always seems to trail the official releases of Django. django-content-editor and feincms3 are almost always compatible with the development version of Django by way of running the tests with the main branch as well. This allows me to be an early adopter of upcoming Django releases with a software stack that’s already well tested, or also to report bugs to the Django project itself. All that probably wouldn’t … -
Migrating a Django Project from a GPU to a Convenience Image on CircleCI
Recently we learned that as of September 30th, 2023 several linux images will be deprecated, including the one we used, ubuntu-2004:202111-02. Therefore, after September 30th, our pipelines would have failed. To avoid this, we switched several machines in our Django project from Ubuntu GPU images to convenience images; This writing details that switch. Updating a GPU machine image can be a bit tricky. One must ensure that the base image language version and project language version match. Otherwise, updating the GPU image version might result in inadvertently updating the base language version. Resulting, for instance, in a project that uses Python 3.9 and an image (in case of a test image) running those tests in Python 3.11. This might result in issues. To avoid having to constantly update our image, to ensure that our image version is what we intend it to be, and to embrace CircleCI’s current technology we migrated to a next-generation convenience image. According to CircleCI, convenience images are “extensions of official Docker images, and include tools especially useful for CI/CD.” The next-generation convenience images were “built from the ground up with CI, efficiency, and determinism in mind.” CircleCI claims that the next-generation images have a faster … -
Deploying a Machine Learning Model to AWS Lambda
This tutorial shows how to deploy a machine learning model to AWS Lambda. -
Weeknotes (2023 week 33)
Weeknotes I’m not sure if I should call these posts weeknotes when I see the posting schedule, but oh well. Keep expectations up but also practice forgiveness when not meeting them, it’s fine really. py_modules using hatchling I converted speckenv and django-sitemaps after finding the following very helpful post on packaging projects consisting of Python modules without any packages: Packaging of single Python module projects with Hatch/Hatchling. It’s very easy in hindsight, but that’s basically always the case. The relevant part is including the files in the build: [tool.hatch.build] include = [ "speckenv.py", "speckenv_django.py", "speckenv_django_patch.py", ] That’s all. django-debug-toolbar and tracing the cause of DB queries in an async world I have also started investigating what would have to be changed in django-debug-toolbar to make it fully support async Django. We currently patch Django’s database cursors per thread, which works fine in sync Django land to attribute SQL queries to a particular request/response cycle. Since async Django executes DB queries in a thread pool executor and the rest of the work happens inside awaitables (async land) I don’t immediately see a way how we could do the same thing. It doesn’t seem possible to find out which task spawned another … -
Django News - PyPI token scanning - Aug 18th 2023
News GitHub now scans public issues for PyPI secrets GitHub now detects and revokes exposed PyPI tokens in public repositories. pypi.org pip-tools v7.2.0 it supports -c/--constraint option to sync extra dependencies "Starting from pip-tools v7.2.0 it supports -c/--constraint option so that you can keep in sync your extra dependencies with the main dependencies while using pyproject.toml." Via Albert Tugushev. mastodon.social Python Docs now feature a dark theme! "The #Python docs now have a dark theme! 🌒 " via hugovk mastodon.social Updates to Django This week’s updates is curated by David Smith, Django review and triage team member and django-crispy-forms maintainer. Thank you David! Last week saw 11 pull requests merged into Django by 7 different contributors - including 3 first time contributors! Congratulations to Jingbei Li, Azat and xYazz for having their first commits merged into Django - welcome on board! Contributions last week included addition of the Uyghur (Ug) language where translations will be available from 5.0. The Oracle backend saw the addition of support for the python-oracledb driver and support for the previous cx-oracle module being deprecated. Mariana Pereira who is part of the Djangonaut Space contributor programme had their second PR merged this week to fix ticket … -
Deployment Checklist - Building SaaS #168
In this episode, I added the deployment checklist and improved the security of the app. Then we moved to work to set up the database to use DATABASE_URL and prepare to use Postgres. -
Deployment Checklist - Building SaaS with Python and Django #168
In this episode, I added the deployment checklist and improved the security of the app. Then we moved to work to set up the database to use DATABASE_URL and prepare to use Postgres. -
Contributing to Django - David Smith (Ep97 Replay)
David Smith on Twitterdjango-crispy-formsdjangobenchDiátaxis FrameworkAirspeed Velocity (ASV)DSF Triage & Review TeamVictor Stinner’s Notes on Benchmarking PythonSupport the ShowLearnDjango.comButtonDjango News