Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
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 -
Hire for Floors, not Ceilings
When you’re hiring, try not to get caught in the trap of evaluating candidates based on their best possible performance. Look instead for consistency: reliable results in variable conditions, the ability to deliver predictably with consistent quality, and so forth. -
Composition over inheritance: The case for function-based views
Composition over inheritance: The case for function-based views A recent conversation with Carlton on Mastodon prompted me to write down some of my thoughts re. function- vs class-based views in Django. The early days When I started using Django some time after 0.96 and 1.0 all views were function based. Except when you added a class with a def __call__() method yourself – that was always possible but not really comparable to today’s class-based views. The introduction of class-based views Class based views (both generic versions and the base View) were introduced to Django in 2010. Judging from the ticket tracker the main motivation was to avoid adding yet another argument to the generic function-based views (GFBV) which we’re available in Django back then. The GFBV’s argument count was impressive. Two examples follow: def object_detail(request, queryset, object_id=None, slug=None, slug_field='slug', template_name=None, template_name_field=None, template_loader=loader, extra_context=None, context_processors=None, template_object_name='object', mimetype=None): ... def archive_month(request, year, month, queryset, date_field, month_format='%b', template_name=None, template_loader=loader, extra_context=None, allow_empty=False, context_processors=None, template_object_name='object', mimetype=None, allow_future=False): ... The GFBVs where immediately when GCBVs were introduced and later removed in 2012. Class-based views have to be adapted by calling the View.as_view() method; as_view() returns arguably the thing which is viewed (sorry) as the view by … -
Django News - Python 3.12.0rc1 and Generative Agents oh mai - Aug 11th 2023
News Python 3.12.0 release candidate 1 released Python 3.12.0rc1 is the first release candidate of Python 3.12, with a final version expected on 2023-10-02. Maintainers are urged to ready their projects for 3.12 compatibility, though this preview is not advised for production use. blogspot.com The Python Software Foundation 2022 Annual Impact Report The Python Software Foundation's 2022 Annual Impact Report highlights a year where they welcomed a new Executive Director, reconvened for the first in-person PyCon US since 2019, expanded membership options, awarded $215K in grants, incorporated PyLadies chapters into their fiscal sponsorship program and much more. python.org Python Software Foundation News: Announcing Our New PyPI Safety & Security Engineer! Mike Fiedler joins the PSF as the inaugural PyPI Safety & Security Engineer, boasting 15 years of Python experience and a recent role as a PyPI Maintainer. See from Mike's follow-up post too. blogspot.com Updates to Django Updates to Django This week the updates have been curated by Yemisi, from the Djangonaut Space contributor program. You can find Yemisi on Twitter @Oluwayhemisi1 or LinkedIn Oluwayemisi Ismail. In the previous week, we had 17 pull requests merged into Django by 11 different contributors. Notably, we're thrilled to acknowledge the participation of … -
Practical Business Jinja
Inspired by the Practical Business Python blog this Python Frederick meetup will cover how to automate document creation using Python-docx and Jinja. -
Practical Business Jinja
Inspired by the Practical Business Python blog this Python Frederick meetup will cover how to automate document creation using Python-docx and Jinja.