Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Test and Code - Brian Okken
Test and Code podcast Python Testing with pytestDjango Testing Tutorial pytest-django Testing in Django: Official Docs awesome-django repo testing section PythonBytes 204 w/ Will and Carlton Support 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. -
Haproxy dummy backends: don't disable them in 2.2
We've got quite a number of different websites on different servers. We use a central haproxy server (well, two, for fail-over) to distribute the various domains to the (django) websites. There are two special categories I wanted to handle: Internal-only sites that are only available on our interal IP range. When accessed from elsewhere, you should get a "403" error with an error page saying it is an internal-only site plus a hint to use VPN. Domains that aren't found. A 404 with a "we don't know about this one" error message. With haproxy 2.2, which is the version we're using now on ubuntu 22.04, there's support for this with http return status 404 or something like that. Until two months ago, we were on an older ubuntu with haproxy 1.8. There the trick to accomplish it was to use dummy backends: backend no-domain-found # No servers here, it is used for showing the "404" page. Well, haproxy # knows no 404 itself, so we let the empty backend generate a 503, but we # sneakily return a 404 error page (including 404 header). See # https://serverfault.com/q/496460/52614 errorfile 503 /some/where/503-as-404.http disabled # Don't show it in the interface. backend deny-external … -
Django for Beginners 4.2 Update
What's new in the book -
Weeknotes (2023 week 17)
Weeknotes (2023 week 17)Birthday Another year achieved. Feels the same as last year. I’m glad. feincms3-cookiecontrol I have released feincms3-cookiecontrol 1.3. Mostly cleanups since 1.2, but also a new translation (already announced here). The script size has been reduced from 4519 bytes to 4228 bytes (-6.5%) while keeping all features intact. The reduction is totally meaningless but it was fun to do. oEmbed I have been digging into the oEmbed spec a bit. I didn’t even know that a central list of providers exists. Noembed still works great to embed many different types of content but I worry more and more about its maintenance state. Reimplementing the interesting parts shouldn’t be that hard, but maybe I don’t have to do this myself. oEmbedPy looks nice, I hope I get a chance to play around with it. -
Django News - Django 5.x Technical Board Candidate Registration - Apr 28th 2023
News Django 5.x Technical Board Candidate Registration - Update An update on candidates for the Django Technical Board. djangoproject.com Introducing Python Package Index Organizations The Python Package Index (PyPI) adds Organizations. pypi.org urllib3 v2.0.0 is now generally available urllib3 is the most installed Python package of all time and, after 12 years, has finally moved from v1.0 to v2.0. sethmlarson.dev Articles How to have Python show warnings when running Django Two ways to see deprecation warnings when running your Django project. untangled.dev Using Django’s template loaders to configure Tailwind An elegant way to tell Tailwind where your Django templates are located. noumenal.es authentik on Django: 500% slower to run but 200% faster to build Debating the pros/cons of Django for building a startup. goauthentik.io sqlite-history: tracking changes to SQLite tables using triggers (also weeknotes) On the beginnings of a new project, sqlite-history, from Simon Willison. simonwillison.net Forum How many people actually use Argon2? The official docs have recommended its usage since Django 1.10, yet it's unclear how widely used it is in the real world. djangoproject.com Events DjangoCon Europe - Things to Do A helpful list of the many things to do nearby if you have some free time around … -
Python Exercises and Behind the Scenes - Building SaaS with Python and Django #159
In this episode, we covered more intro Python exercises from Exercism. Then I did some behind the scenes work to make some improvements to my stream content. -
Python Exercises and Behind the Scenes - Building SaaS #159
In this episode, we covered more intro Python exercises from Exercism. Then I did some behind the scenes work to make some improvements to my stream content. -
20 Years of Python - Brett Cannon
Brett's personal site @brettcannon on GitHub and Fosstodonpython-launchermicrovenvLLMs and the Business of Truth The Chinese Room ArgumentPEP 4 - Deprecation of Standard Modules Support 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. -
Accepting Payments with Stripe, Vue.js, and Flask
This tutorial details how to develop a web app for selling products using Stripe, Vue.js, and Flask. -
Deploying a Flask and Vue App to Heroku with Docker and Gitlab CI
This tutorial looks at how to containerize a full-stack web app powered by Flask and Vue and deploy it to Heroku using Gitlab CI. -
Weeknotes (2023 week 16)
Weeknotes (2023 week 16) Experiments with Stable Diffusion A friend and myself threw a few scripts together to automatically finetune a Stable Diffusion model using images downloaded from Google Image search. It’s terrifying how easy and fast generating fake news including photorealistic images can be and will be already. And seeing how fast those models improve it’s just a matter of time until we can trust photos even less than now. Manipulating images has been possible for a long time of course, but it hasn’t been a “commodity” until now. I definitely also see upsides in the new machine learning technologies but I fear that there’s a real danger to trust, and in extension to democracy. This technology and what we did will be a part of an upcoming SRF Kulturplatz broadcast, or so I hope. It’s high time that the public knows what’s possible. It’s about ,edia literacy really. I’m not that pessimistic though. I just hope that this time the thoughtfulness will prevail over pure profit seeking. (Did I really write that.) django-ckeditor Many people are noticing that the CKEditor 4 integration for Django doesn’t work that well when using the dark color scheme of the Django admin … -
Django News - Django 5.x Technical Board Election Registration - Apr 21st 2023
News Announcement of 5.x Technical Board Election Registration A new Technical Board election is coming up. All individual DSF members can vote or you can register to vote, too. djangoproject.com Google Season of Docs: Creating Wagtail Developer Onboarding Tutorials After a positive experience with Outreachy, the Wagtail core team participates in Google Season of Docs to enhance onboarding tutorials for developers and improve engagement with technical writers in their community. Google Season of Docs is an annual program that supports open-source documentation and provides technical writers with valuable experience. wagtail.org Django Software Foundation DSF Board monthly meeting, April 13, 2023 djangoproject.com Sponsored Link Sponsor Django News django-news.com Articles Chatting with Django’s documentation using langchain, Chroma & OpenAI APIs Explore new AI tools for software development by building a Python CLI application that indexes Django's documentation and answers questions within that context using OpenAI's Embeddings & GPT APIs, Chroma, and langchain. hacksoft.io Running Tasks Concurrently in Django Asynchronous Views From Django Fellow Mariusz Felisiak, an overview of async in Python and Django, and how to write async views today. fly.io How to add Typescript to the Django Project An overview of Typescript and examples of how to add to existing Django … -
Python Exercism Exercises / Template Updates - Building SaaS with Python and Django #158
In this episode, I went through a few quick exercises on Exercism in the Python track. Then I returned to the features I’m developing that displays course resources connected to tasks in my homeschool app. -
Python Exercism Exercises / Template Updates - Building SaaS #158
In this episode, I went through a few quick exercises on Exercism in the Python track. Then I returned to the features I’m developing that displays course resources connected to tasks in my homeschool app. -
The insides of my static site generator
The insides of my static site generator Last sunday I wrote that I’m now using a hacky ~200 LOC Python script to generate this blog. The ~200 LOC became a challenge to myself immediately and I started refactoring the code while adding additional features, adding a licensing comment at the top and further reducing the lines of code in there. I don’t intend to stop working on it, but I’m really happy with the result as it is currently. The script is less than 190 lines long and supports: Generating individual HTML files for the front page, the category pages and posts Generating robots.txt and sitemap.xml Generating Atom feeds for all posts and posts of each category Minifying HTML and CSS using minify-html and rcssmin; the CSS is outputted as a single file and includes the content hash in the filename for better cacheability Keeping the link structure of the old Django-based website I used Django’s feedgenerator.py module at first to generate the Atom feed; I have since switched to directly working with the ElementTree API. Yes, it’s probably less efficient since it has to keep the whole XML tree in memory but who cares when the largest file’s file … -
Weeknotes (2023 week 15)
Weeknotes (2023 week 15) Romansh translations for feincms3-cookiecontrol and django-fineforms The feincms3 cookie control banner and django-fineforms have received a small update: Support for the Romansh language. I would be surprised if any readers of this blog even knew about this language at all. Switzerland has four official languages: German, French, Italian and the mentioned Romansh. It’s not a coincidence of course that those two packages have received an update at the same time. Both packages are used for an upcoming campaign site where people may express their support for political action to preserve or protect the biodiversity. It’s at the same time laughable and horrifying that this is even a thing though: Who in their right mind could NOT agree that preserving biodiversity is important? It’s incomprehensible. Maybe I’m just a romantic Gutmensch after all… django-ckeditor I have set up the stale GitHub action for the django-ckeditor repository. So many support requests, so little time and almost no actual collaborators. Also, many support requests actually concern CKEditor itself, not its Django integration. I shouldn’t complain though, CKEditor has served me well and still does, especially when it’s being used with a very minimal configuration which basically makes most pain … -
Static site generation
Static site generation I did what I threatened (myself) to do: I replaced the Django code base for this weblog with a static site generator. My main goal was to preserve as much as possible of the existing structure, including the Atom feeds and the IDs of posts so that the rewrite wouldn’t flood any aggregators. The end result is a hacky ~200 LOC Python script which uses Markdown, Jinja2 and minify-html. Markdown is great for blogging and I have been using it for a long time, basically since I started this website in 2005. I don’t like it that much for documentation, but that’s a story for another day. For now I still deploy the blog to a VPS but there’s nothing stopping me from uploading it somewhere else. I’m thinking about using GitHub actions for the deployment, but I can do that another day. -
Django REST Framework Basics
This article serves as an introduction to Django REST Framework, focusing on serializers, views, and routers. -
Psycopg3 Binary and Django 4.2 Installation Quick Tip
One of [Django 4.2's major features](https://docs.djangoproject.com/en/4.2/releases/4.2/#psycopg-3-support) is support for [Psycopg 3](https://www.psycopg.org/psycopg3/), the new implementation of the popular PostgreSQL adapter for Python. It is a replacement for Psycopg 2 that adds … -
Django News - htmx 1.9.0 released - Apr 14th 2023
News htmx 1.9.0 has been released! htmx 1.9.0 has been released, which includes new features such as support for view transitions and generalized inline event handling via the new hx-on attribute, as well as improvements and bug fixes. htmx.org PSF News: The EU's Proposed CRA Law May Have Unintended Consequences for the Python Ecosystem The PSF has expressed concerns about the proposed Cyber Resilience Act and Product Liability Act, stating that the policies could unintentionally harm users and put the health of the open-source software community at risk. blogspot.com GitHub Accelerator: our first cohort and what's next GitHub Accelerator, a program that fosters sustainable open-source projects, has announced its first cohort of 20 projects and 32 participants worldwide. Among the diverse projects selected are htmx, Strawberry, and Datasette, all of which have ties to the Django community. github.blog Sponsored Link Upgrade Django Upgrade Django is a simple cheat sheet to Django versions and releases with additional observations from REVSYS on the most exciting highlights, gotchas, and other information from their extensive experience upgrading clients' Django applications. upgradedjango.com Articles Building an Intelligent Education Platform with OpenAI, ChatGPT, and Django An article describes leveraging artificial intelligence technology such as GPT-3 and ChatGPT … -
Web Dev Panel Discussion
What is your burning web development question? That was the request for April’s event in 2023! We had a panel of web developers who were there to discuss web development questions and talk through the future of web development. -
Web Dev Panel Discussion
What is your burning web development question? That was the request for April’s event in 2023! We had a panel of web developers who were there to discuss web development questions and talk through the future of web development. -
Being a Productive Developer - Nick Janetakis
Nick Janetakis personal siteDive into DockerLearn to Build Web Applications with Flask and Dockerdjango-docker-example: diff fixing Django template cache patchmailcatcherNick’s YouTube channeldjango-upgrade packageHow to upgrade Django to a newer versiondjango-simple-deployTop 10 Django Third-Party PackagesSupport 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 Build To Last
Tim does an amazing job applying "Build to Last" principles to Django. Community and reliability are two of the three most important reasons making me enjoy Django for a very long time (documentation being the third). I think it is healthy for any project to know what its distinguishing attributes are, as well as having a plan for where the project will go the next few years. And while I agree with Tim, I want to add a bit more to the big hairy audacious list of goals to take into consideration. Still, this does not mean deployment is not one of the biggest pain points of any Django or Python project. I would even go as far as claiming that Docker would never have risen in popularity as much as it did if interpreted languages would have had a sane deployment story. Remember Java? Compile a fat jar and drop it on an application server. Done. Or just run the fat jar by bundling your webserver. But this is the old man in me speaking. So let us talk about Golang and Rust - two modern languages, well regarded (I know, I know, we can have a fight about … -
Django News - Django 4.2 released - Apr 7th 2023
News Django 4.2 released The Django team is happy to announce the release of Django 4.2. djangoproject.com Welcome our new Django Fellow - Natalia Bidart The DSF Board and Fellows Committee are pleased to introduce Natalia Bidart as our new Django Fellow. Natalia will be joining Mariusz Felisiak who is continuing his long and excellent tenure as a Fellow. djangoproject.com Django bugfix release: 4.1.8 This update fixes a bug in Django 4.1.7 that causes invalidation of sessions when rotating secret keys. djangoproject.com Python 3.10.11, 3.11.3, and 3.12.0 alpha 7 released Python 3.11.3, 3.10.11, and 3.12 alpha 7 are now available. python.org Wagtail 4.2.2 and 4.1.4 release notes Security and bugfixes in the latest Wagtail release for 4.2.2 and for 4.1.4. wagtail.org Sponsored Link Meet Wagtail, the #1 Django-powered CMS 100% open source. Powered by Python & Django. Built for editors and developers with excellent documentation. Trusted by Google, NASA and hundreds of thousands of organisations around the world. bit.ly Articles Top 10 Django Third-Party Packages An opinionated list of the top 10 third-party packages for any Django project. learndjango.com Django Performance Optimization Tips This article looks at where potential performance issues can occur in a Django application and how to …