Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Boring Python: dependency management
This is the first in hopefully a series of posts I intend to write about how to build/manage/deploy/etc. Python applications in as boring a way as possible. So before I go any further, I want to be absolutely clear on what I mean by “boring”: I don’t mean “reliable” or “bug-free” or “no incidents”. While there is some overlap, and some of the things I’ll be recommending can help to reduce bugs, I also want … Read full entry -
Recent objects using several Django models
Recent objects using several Django models I released a new Python package which builds on the excellent code published by Simon Willison in the blog post Building a combined stream of recent additions using the Django ORM. The rationale etc. for why this is useful is described much better by him and I’ll save everyone’s time by not repeating it in a worse way. The new package is django-recent-objects, developed on GitHub and available from PyPI. The package supports e.g. combining recent articles and comments in a single activity stream: from testapp.models import Article, Comment from recent_objects.recent_objects import RecentObjects ro = RecentObjects( [ { "queryset": Article.objects.all(), "date_field": "created_at", }, { "queryset": Comment.objects.all(), "date_field": "created_at", }, ] ) additions = ro.page(paginate_by=10, page=1) django-recent-objects adds the following features which aren’t available in the blogpost linked above: The name of the date_field doesn’t have to be the same for all objects Primary keys of different types are1 supported The code uses a real paginator and doesn’t only support fetching the first few objects Hopefully! ↩ -
Celery Alternative for Django - Huey
Trying out a lightweight asynchronous task queue as an alternative to Celery with Django -
Python Project Workflow
This article looks at how to configure GitHub Actions to distribute a Python package to PyPI and Read the Docs. -
Django News - Python in the Browser - May 6th 2022
News PyScript: Run Python in your HTML The most significant announcement to come out of this year's PyCon US is PyScript which runs Python in the browser. While still very new and very beta, PyScript has the potential to change how Python developers approach frontend development. pyscript.net What's New in Wagtail CMS Sign up for this event on either May 18th or 19th to see live demos of new functionality and features in Wagtail 3.0. wagtail.org Read the Docs newsletter - May 2022 If you have never checked out Read the Docs's newsletter updates then today is a good day to change that. Also, check out their May and April Changelogs to see 70+ features, updates, and bug fixes. readthedocs.com Sponsored Link Crunchy Bridge - Fully Managed Postgres as a Service crunchybridge.com Events Hybrid: IndyPy 15th Anniversary Celebration! May 10th at 7 pm ET, IndyPy will be hosting its first hybrid event since the pandemic. Please sign up for in-person or virtual attendance in advance. meetingplace.io Articles Django Static Files and Templates An updated guide to configuring static files and templates both locally and in production for a Django project. learndjango.com Pagination for a User-Friendly Django App How to implement … -
Star Wars and Django
Industrial Light and MagicPyCon Canada 2019: The backend of a global visual effects pipeline@andrecasp on TwitterAndre’s personal siteJames’s personal siteDjangoCon 2019: Using Django as a Micro-Framework by Carlton Gibsondjango-microframework repodjango-hijackSupport the ShowThis podcast does not have any ads or sponsors. To support the show, please consider purchasing a book, signing up for Button, or reading the Django News newsletter. -
Django News - Asynchronous QuerySets coming to Django 4.1 and PyCon US - Apr 29th 2022
News Django 4.1 will have an asynchronous interface for QuerySets! Very exciting news that Django 4.1, expected in August 2022, will have an asynchronous interface for QuerySets! github.com Read the Docs now supports custom build commands See https://twitter.com/readthedocs/status/1519363742869295105 for details readthedocs.io Sponsored Ad Datapane is Hiring Senior and Mid Django Developers Remotely Datapane is an open-source framework which makes it easy for data scientists to create reports, dashboards, and apps using Python. They are growing quickly and are hiring amazing Django developers to help build their report hosting and app execution PaaS. datapane.com Events PyCon US 2022 virtual tickets are still available! It's still not too late to attend PyCon US 2022 online with a virtual ticket. pycon.org PyOhio 2022 CFP closes May 2nd There is still time to submit a talk for PyOhio 2022 which closed on Math 2nd. They are accepting 5-minute and 10-15 minute talks which is a nice format for diving into details without a large time committment. pyohio.org Articles How to Version Control your Django project An introduction to version control and the best practices when it comes to Django projects. builtwithdjango.com Automate your Telegram channel with a Django Telegram Bot Have you ever wanted … -
User Requests - Building SaaS with Python and Django #134
In this episode, we took a break between big projects and worked on some smaller usability features requested by users of the app. -
Appliku - Kostja Palović
Appliku@KostjaPalovic on Twitter speedpycomdjangoxSupport the ShowThis podcast does not have any ads or sponsors. To support the show, please consider purchasing a book, signing up for Button, or reading the Django News newsletter. -
Live Discussion with Sebastián Ramírez (Tiangolo)
On April 26th I had a live discussion with Sebastián Ramírez, creator of FastAPI, Typer, SQL Model, and more. LINKS: https://tiangolo.com https://fastapi.tiangolo.com https://typer.tiangolo.com https://sqlmodel.tiangolo.com https://forethought.ai/ https://forethought.ai/careers/ https://octopusenergy.com/careers -
Django News - Integrating Zapier and Django and Django Unicorn 0.45 - Apr 22nd 2022
News Django Unicorn v0.45.0 released Django Unicorn is a reactive component framework that progressively enhances a normal Django view, makes AJAX calls in the background, and dynamically updates the DOM. If you haven't checked the project out in a while, they have been making steady progress for a while. django-unicorn.com Sponsored Ad Datapane is Hiring Senior and Mid Django Developers Remotely Datapane is helping the open-source Python data ecosystem replace clunky UI-based tools. We want your help. datapane.com Events San Diego Python Users Group (Virtual) - April 28th Multiple talks including an interesting one on Django REST Framework with Machine Learning. meetup.com Articles How I Integrated Zapier into my Django Project Integrating "no-code" Zapier into a Django project. blogspot.com How to Clean Up Unused Code With Git Several good tips for cleaning up unused code with Git. This is one of those things that "feels" really good as an engineer and ultimately does matter to a codebase. adamj.eu Restrain the Rate of Requests with Throttling in Django by Mangabo Kolawole A short but sweet introduction to throttling Django REST framework requests using Django REST framework. dev.to Tutorials How To Build A Django Web App Using Termux And Push To GitHub … -
S3 FileField - Building SaaS with Python and Django #133
In this episode, we built the UI to allow users to request an end-of-year PDF bundle. Then we hooked the model up to S3 via django-storages and tested everything out. -
How I Integrated Zapier into my Django Project
As you might know, I have been developing, providing, and supporting the prioritization tool 1st things 1st. One of the essential features to implement was exporting calculated priorities to other productivity tools. Usually, building an export from one app to another takes 1-2 weeks for me. But this time, I decided to go a better route and use Zapier to export priorities to almost all possible apps in a similar amount of time. Whaaat!?? In this article, I will tell you how. What is Zapier and how it works? The no-code tool Zapier takes input from a wide variety of web apps and outputs it to many other apps. Optionally you can filter the input based on conditions. Or format the input differently (for example, convert HTML to Markdown). In addition, you can stack the output actions one after the other. Usually, people use 2-3 steps for their automation, but there are power users who create 50-step workflows. The input is managed by Zapier's triggers. The output is controlled by Zapier's actions. These can be configured at the website UI or using a command-line tool. I used the UI as this was my first integration. Trigger events accept a JSON … -
Running Python in the Browser with WebAssembly
In this tutorial, you'll build a Python code editor in the browser using WebAssembly (WASM), via Pyodide, and CodeMirror. -
Django News - Django 4.0.4, 3.2.13, and 2.2.28 security releases - Apr 15th 2022
News Django security releases issued: 4.0.4, 3.2.13, and 2.2.28 These Django releases fix several significant security issues. Also, note that this is the final Django 2.2 update. Users should upgrade to Django 3.2 for ongoing LTS (Long-Term Support). djangoproject.com Wagtail 2.16.2 and 2.15.2 bug fixes Wagtail 2.16.2 and 2.15.5 contain bug fixes and updates Jinja2 compatibility. github.com Sponsored Ad 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. 🖖 workable.com Articles Permissions in Django A look at Django's powerful out-of-the-box permission system and how to assign permissions to users and groups in order to authorize them to perform specific actions. testdriven.io Optimize large Django migrations An interesting look at optimizing a large Django migration with the help of Paginator. gabnotes.org Generic Functionality without Generic Relations A very interesting technique for minimizing database queries with aggregate content that shares generic functionality. blogspot.com fstring.help: Python f-string guide A short reference for how to use f-strings. fstring.help Follow the pink pony: A story of CSRF, managed services, and unicorns Django 4.0 introduced a minor change to how Django … -
Great Expectations Data Quality Testing
Great Expectations is a shared, open standard for data quality. It helps data teams eliminate pipeline debt, through data testing, documentation, and profiling https://greatexpectations.io/ -
Django’s Rough Edges - Keryn Knight
Keryn on GitHubKeryn on Twitter Django Triage & Review Teamdjango-technicalerrors Compiling by xkcdSupport the ShowThis podcast does not have any ads or sponsors. To support the show, please consider purchasing a book, signing up for Button, or reading the Django News newsletter. -
Professionalism: What is “professionalism” and why am I writing about it?
I’m starting a new series on professionalism: the set of workplace behaviors that are generally expected at work. These behaviors are largely unspoken, but they do exist: there are consequences for violating them. In this series, I aim to write down some of these rules and explore their implications. Eventually, I hope to have a solid list of what “professional behavior” really means. -
Permissions in Django
This article looks at how to leverage Django's default permission system to assign permissions to users and groups. -
Is my advice too mercenary?
A criticism of some of my writing is that it’s too mercenary. Some see my advice as coldly calculating, too focused on individual outcomes over collective ones, and implicitly distrustful of others. I think this is fair criticism! It’s not exactly what I’m going for, but it’s a fair reading. However, there’s more to it than that, I want to address it (and defend myself, just a little bit). -
Generic Functionality without Generic Relations
When you have some generic functionality like anything commentable, likable, or upvotable, it’s common to use Generic Relations in Django. The problem with Generic Relations is that they create the relationships at the application level instead of the database level, and that requires a lot of database queries if you want to aggregate content that shares the generic functionality. There is another way that I will show you in this article. I learned this technique at my first job in 2002 and then rediscovered it again with Django a few years ago. The trick is to have a generic Item model where every other autonomous model has a one-to-one relation to the Item. Moreover, the Item model has an item_type field, allowing you to recognize the backward one-to-one relationship. Then whenever you need to have some generic categories, you link them to the Item. Whenever you create generic functionality like media gallery, comments, likes, or upvotes, you attach them to the Item. Whenever you need to work with permissions, publishing status, or workflows, you deal with the Item. Whenever you need to create a global search or trash bin, you work with the Item instances. Let’s have a look at … -
Django News - New PSF Executive Director - Apr 8th 2022
News PyPI Organization Account Roadmaps PyPI is looking for users who would be interested in participating in user interviews (25-30 minutes or less and would take place every 2 weeks.) python.org PSF News: PSF Welcomes New Executive Director Deb Nicholson The Python Software Foundation (PSF), the non-profit home of the Python programming language community, welcomes Deb Nicholson as its new Executive Director. blogspot.com Python Release Python 3.11.0a7 Python 3.11.0a7 is the last of seven planned alpha releases. python.org Sponsored Ad 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. 🖖 workable.com Articles How to Squash and Rebase a Git Branch It can be tiresome to rebase feature branches with many commits. Adam Johnson shows how rebase and squash commits together. adamj.eu XSS Filter Evasion - OWASP Cheat Sheet Series This article is focused on providing application security testing professionals with a guide to assist in Cross Site Scripting testing. You are guaranteed to find a few dozen that you have never seen before. owasp.org Those HTML Attributes You Never Use Louis Lazaris describes and demonstrates … -
Your last one-on-one: what to do instead of an exit interview
Say you agree with me that exit interviews are dangerous for employees, but you’re a kind, empathetic manager who’s built a team with high trust. You’d never dream of retaliation, are open to feedback – even if it’s harsh. You don’t want to put your departing direct in an uncomfortable or threatening position, but you’d like to know what they have to say! What then? -
Amsterdam python meetup
(Summaries of a talk at the April 2022 py.amsterdam meetup). Interesting takeaways from book 'Test Driven Development With Python' - Rok Klancar The book "test driven development with python" is available for free onine at https://www.obeythetestinggoat.com/ . The subtitle is test driven development (TDD) for the Web, with Python, Selenium, Django, JavaScript and pals... It is a quite thick book, but the author is very enthousiastic about programming and the subject of testing, so it actually very readable. The book consists of three parts: The basics of test driven development and django. So he starts out with explaining web development with django, just enough for having something real to test. Web development sine qua non. He's serious, at the end of part two you'll actually have deployed a web application. (And you'll have tested it, of course.) More advanced topics in testing. The core idea of test driven development is that you first write a (failing!) test and only then you write the code to get the tests to pass. The first test in the book is whether you have installed django (which you haven't yet). That sets the tone for the rest of the book :-) The whole time … -
Exit Interviews Are a Trap
It’s tempting to air your grievances at your exit interview. Don’t. There’s almost no upside to speaking up, and tremendous potential downside. Avoid exit interviews if you can. If you must go, be totally bland; say nothing negative.