Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django News - Django 4.0 beta 1 released - Oct 29th 2021
News Django 4.0 beta 1 released Django 4.0 beta 1 is now available. It represents the second stage in the 4.0 release cycle and is an opportunity for you to try out the changes coming in Django 4.0. djangoproject.com Events What’s New in Wagtail CMS: episode 5 A webinar all about what's new in Wagtail occurring on November 10th and November 11th. wagtail.io Python Web Conf 2022 Call for Proposals ends November 1st. papercall.io Sponsored Jobs Building Intelligent Space Infrastructure Cognitive Space is building intelligent infrastructure for the new space domain with Python at the core. We are looking for passionate Python developers in backend, dev ops, and machine learning. 🖖 cognitivespace.com Articles Profiling a Django App An overview of three tools--Pyinstrument, QueryCount, and Django Silk--for profiling your Django App. kracekumar.com Django HTMX Modal Popup Loveliness A pattern explained with code for providing Django modal popups via HTMX. andytwoods.com Tests aren’t enough: Case study after adding type hints to urllib3 Since Python 3.5 was released in 2015 including PEP 484 and the typing module type hints have grown from a nice-to-have to an expectation for popular packages. To fulfill this expectation our team... sethmlarson.dev Notes From the Meeting On Python … -
Mercurial Mirror For Django 4.0 Branch
The first beta for Django 4.0 was just announced, and it’s time for another ‘production’ mercurial mirror. The URL (both web browsing and mercurial cloning) is https://hg.freehackers.org/mirrors/django-4.0-production The list of all mirrors is on this page -
Fallback Offline Page in Django
Use Service worker to cache the offline page, and return the page when network is not available -
Mastering Django - Nigel George
DjangoBook.comMastering DjangoBuild a Website with Django 3Support the ShowThis podcast does not have any ads or sponsors. To support the show, please consider visiting LearnDjango.com, Button, or Django News. -
When you're a manager, your behavior is under a microscope
If you want to be a good manager, you need to accept that your behavior is under a microscope. You need to watch your behavior carefully and pay attention to what that behavior communicates. -
Dear Potheads, You Can Work for the U.S. Government, Maybe
If you’ve used marijuana, can you still get hired by the Federal Government? Yes, but it’s complicated. I’ll try to explain… -
Django tip: Redirecting straight from urls.py
<![CDATA[ Django tip: Redirecting straight from urls.py This might be obvious to you if you are used to working with Class-based Views, but for me this was new and pretty cool. I wanted to redirect one URL to another view and before implementing lean function view with the redirect function, I decided to look if better solution exists.. And indeed it does. Meet RedirectView. You can use it inline in your urls.py to greatly simplify things. It can redirect either based on another route name or to any arbitrary URL. For example here is usage from my project: urlpatterns = [ path('', RedirectView.as_view(pattern_name='profile-detail', permanent=True)), ] These are URL patterns prefixed with account and I wanted the unspecified URL to redirect to account/profile which this accomplishes. The permanent settings dictate whether 301 or 302 is returned as a status code. Instead of pattern_name you can use url attribute and redirect to anywhere. Or you can pass None there to raise status code 410, which means that this URL is no longer available. And last attribute query_string lets us specify whether possible query string in the URL should be kept (True) or removed (False, default value). And that's it! This can be … -
Django News - DjangoCon US this Friday/Saturday - Oct 22nd 2021
News DjangoCon US - October 22-23 The major US Django conference is online and free this year. Talks premier October 22-23, 2021, and you can watch them by joining our YouTube channel today! djangocon.us Python Developers Survey 2021 Please take a moment to fill out the annual Python survey that helps guide development of the language and informs the community. jetbrains.com Psycopg 3.0 released A major update of the popular database adapter supporting Python 3.6-3.10 and PostgreSQL 10-14. psycopg.org PyPI User Feedback - Packaging - Discussions on Python.org Feedback is requested for users of PyPI. python.org Sponsored Jobs Building Intelligent Space Infrastructure Cognitive Space is building intelligent infrastructure for the new space domain with Python at the core. We are looking for passionate Python developers in backend, dev ops, and machine learning. 🖖 cognitivespace.com Articles Three more uses for functools.partial() in Django Adam Johnson on three more ways to use functools.partial() with Django. adamj.eu Help users change passwords easily by adding a well-known URL for changing passwords By redirecting requests to /.well-known/change-password to the change password URL, you can let users update their passwords easier than before. web.dev Django related fields and the caveats of implicit SQL INNER JOINs A … -
Add Service Worker to Django
Learn what is Service Worker and how to serve Service Worker in Django -
Bulk Delete Template - Building SaaS with Python and Django #118
In this episode, I worked on the bulk delete template that users will see when deleting tasks within the homeschool app. -
Simple Product Management Tricks
Three simple tricks product I’ve picked up that help me be more than completely useless when I need to wear a Product hat. -
Foss4g NL: afternoon session
(One of my summaries of a talk at the 2021 FOSS4G NL one-day conference). Fast "BGT" dataset import with Docker - Martijn van der Struijk (Note: the BGT (basisregistratie grootschalige topgrafie) is the Dutch database with all buildings, roads, waterways, etcin the whole country, including metadata). You can download the BGT via an API. Previously, you could only download the entire dataset. Now there's also a "delta" endpoint that allows only changes compared to your already-downloaded version. To handle all this, they made a "BGT loader" as a docker image. It can download the initial version + deltas. Output can be into postgis/oracle/SQLserver. They use it themselves to run it every night to update their database. He demoed it by downloading a fresh copy of all the data for the couple of kilometers around the conference location. Easy: just a single "docker" command. Nice. The tool stores the download-metadata (like the optional filter and the ID of the most recent change), so that a quick "download update" command is enough to update the current database contents. Landgoed cloud - Marco Duiker Landgoed provides foss geo services, consultancy training, etc. So one of the things they sometimes need is 20 new, … -
Django News - High Performance Django is Free Online - Oct 15th 2021
News DjangoCon US is next week! Thanks to our generous sponsors, DjangoCon US is free, online, and next week, October 22-23. If you would like to attend this year, this is also our last call for tickets. djangocon.us High Performance Django Is Free Online Our friends at Lincoln Loop wrote a book, High Performance Django back in 2014, and it's now is now available for free online. lincolnloop.com Wagtail 2.14.2 and 2.13.5 releases! New Wagtail 2.14.2 and 2.13.5 bug fixes. wagtail.io Events FlaskCon 2021 Our friends at FlaskCon have their CFP open through October 24th. flaskcon.com PyCon US 2022 website is live PyCon US 2022 will be in Salt Lake City, UT from April 27, 2022 - May 5, 2022. pycon.org Sponsored Jobs Building Intelligent Space Infrastructure Cognitive Space is building intelligent infrastructure for the new space domain with Python at the core. We are looking for passionate Python developers in backend, dev ops, and machine learning. 🖖 cognitivespace.com Articles Putting Pants On: One Thing We Did Right After 5 Years with Django A look at various improvements from moving a Django codebase to a monorepo using the Pants build framework. github.io Tips for debugging with print() Five tips from … -
Accepting Crypto Payments with Django and Coinbase
This tutorial looks at how to accept crypto Payments with Django and Coinbase Commerce. -
Pandas for Data Analysis
#Pandas is a great library for reading and manipulating data. Chris Malec gave an overview of pandas, focusing on how to read in some common data types, create filters to specific table cells, apply functions to your data, merge tables together, and create nice plots as well as summary tables from your data. For an application, Chris used some financial data, and briefly discussed his work at FinRA finding manipulative behavior in the US stock market. -
Coverage.py - Ned Batchelder
Ned’s personal site@nedbat on Twitter, Discord, and IRCInteractive Walks post coverage.py django-coverage-pluginSpeed Up Your Django Tests by Adam Johnson bookedx-platform CogSupport the ShowThis podcast does not have any ads or sponsors. To support the show, please consider visiting LearnDjango.com, Button, or Django News. -
What is your labor worth? Tech compensation in 2021
Salaries in tech are going up, and many people are looking for new jobs or reevaluating the ones they have. However, many tech workers have no idea what their labor is worth on the open market. There’s a huge information asymmetry here: employers have access to detailed industry data on salaries, but workers don’t. In this article, I’ll share a method people can use to determine the “market rate” for their skills. I’ve developed this method over the last six months, as I’ve helped nearly 100 people figure out their worth. Feedback has been that this is pretty accurate, so I’m sharing the technique here so you can use it to determine what your labor is worth. -
Python 3.10: What's New
This article looks at the new features in Python 3.10 and how they can be implemented. -
Three more uses for functools.partial() in Django
I remain convinced that Python’s functools.partial() is underappreciated. Following my previous post, here are three more ways to use partial() with Django. (For an explanation of partial() see PyDanny’s post.) 1. Customizing render() Django’s render() shortcut simplifies generating an HTTP Response from rendering a template. If several views need to pass the same arguments, we can wrap the shortcut with partial() to avoid repetition. For example, imagine we have several views that return text, rather than HTML. We could create our own render_text shortcut that calls render with the content_type argument pre-filled: from functools import partial from django.shortcuts import render render_text = partial(render, content_type="text/plain") def robots_txt(request): ... return render_text(request, "robots.txt") def security_txt(request): ... return render_text(request, "security.txt") (See my posts on robots.txt and security.txt.) We can use this approach with other shortcut functions, or even HttpResponse & its subclasses. 2. transaction.on_commit() callbacks Django’s examples for transaction.on_commit() use functions, or lambdas: from django.db import transaction # With a function def send_email(): send_admin_email( subject="Author created", # ... ) transaction.on_commit(send_email) # With a lambda transaction.on_commit( lambda: send_admin_email( subject="Author created", # ... ) ) In the wild, most on_commit() callbacks only call another function with pre-filled arguments. Using lambda can make this easy, but lambda … -
DjangoCon is Back and Free of Charge
We’ve waited eagerly for DjangoCon 2021 since last year’s event was cancelled due to COVID-19. Not only is the event back, but it’s free to attend! DjangoCon will take place virtually on October 22 and 23 — it will be unprecedented since this is the first time the conference will be virtual. “We are very excited to allow our virtual conference to be free,” said Sponsors Co-Chair Catherine Holmes who has been involved as an organizer since 2018. “In the past, the cost of tickets varied based on the cost of location, including the venue and catered meals.” But with none of that this year, the event is much more affordable to host, and the organizers decided to pass those savings on to the attendees. For comparison, tickets for the last in-person conferences in San Diego in 2018-19 were as high as $795 — so attending for free provides substantial savings. There is an option to submit a donation when you register for DjangoCon. Donations in any amount are appreciated and will go toward conference costs. Organizers like Holmes and Sponsors Chair Dawn Wages hope the low barrier to entry will attract more attendees, especially those who may not have … -
Django News - Django 3.2.8 and Python 3.10.0 now available! - Oct 8th 2021
News Django bugfix release: 3.2.8 A new bugfix that fixes two issues from 3.2.7. As ever, the best security practice is to always be on the latest version of Django. Here's how to upgrade. djangoproject.com Python Insider: Python 3.10.0 is available Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations. blogspot.com 🎃 GitHub's guide to Hacktoberfest 2021 October is Hacktoberfest, and there are better-defined rules this year and plenty of Django and Python projects that are looking for contributions. github.blog Events PyCascades 2022 is back! The CFP (Call for Proposals) is open now and closes Sunday, October 24th. Speaker invitations will be sent out Monday, November 15th. pretalx.com DjangoCon US 2021 DjangoCon US 2021 will be online only on October 22-23. Make sure to grab a free ticket in advance. djangocon.us Sponsored Jobs 💼 Canopy is hiring software engineers! We are seeking experienced software engineers to join our talented engineering team. We provide social impact programs evaluation & technical tools to maximize success! canopyteam.org Articles Django Fellow Reports Carlton Gibson, one of two Django Fellows, has moved his Fellow Reports to his website. These are excellent ways to catch … -
Bulk Delete Form - Building SaaS with Python and Django #117
In this episode, I worked on the bulk delete form that I need so that my customers can delete many tasks in the system at once. -
How to Delegate Meeting Attendance
Wrapping up my series on delegation with an example: how to delegate meeting attendance. -
Dutch python meeting: behaviour driven development - Jan-Hein Bührman
(One of my summaries of a talk at a Dutch python meeting, this one in october 2021 at the Amersfoort zoo) Behaviour driven development (BDD) is something that gets mentioned at python meetups and conferences from time to time. See this example from 2019. What is behaviour driven development? The core point is that you specify feature behaviour. Concrete, realistic examples to create a shared understanding of how the system should behave. It is defined as a scenario: Input Actions Outcomes What is commonly used is the "Gherkin" language: "given .... when .... then ....". In Java, "cucumber" is a well-known library for BDD. In python you have behave. BDD has a big benefit: you have concrete examples in an unambiguous specification. And it is in a language that can be understood by everyone from customer to programmer. An example: Scenario: simple google search Given: the google homepage is displayed When: the user enters "panda" in the search bar Then: links related to "panda" are shown on the results page. "Given" describes the initial stable state. "When" describes the action that's relevant for the scenario. "Then" describes the outcome of the action. You can add "and" statements to expand on … -
Dutch python meeting: structural pattern matching - Sebastiaan Zeeff
(One of my summaries of a talk at a Dutch python meeting, this one organised by Ordina in october 2021 at the Amersfoort zoo) Link to his slides Structural pattern matching (PEP (python enhancement proposal) 634) is the main new feature of the new python 3.10. Not everyone was happy with structural pattern matching. One of the comments: I see the match statement as a domain specific language that looks like python, but that does something surprisingly differently. Yes it is a special mini-language. A bit like regular expressions, which is also a special mini-language within python. What is structural pattern matching? It is not a simple C++ "switch" statement. One of the differences is that python's "match" statement only matches one of the patterns: with C++, you'd have to add "break" statements otherwise you can have multiple matches. It is not just matching string literals. Structural pattern matching tries to match objects by their shape. So: the value and/or the type. For sequences: how many elements? Dicts: which keys? What kind of values? Which attributes does an object have? This is how it looks: match <target>: case <pattern> [if <guard>]: <block of code> case <pattern> [if <guard>]: <block of …