Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Weeknotes (2023 week 5)
Weeknotes (2023 week 5) A long time has passed since I tried writing week notes. Oh well, here we go again. No committment here, just hope. Podcasts Really got into listening to podcasts in the last few weeks. That’s new for me, I never enjoyed listening to people talk when I could also listen to music. So, that’s interesting. Podcasts I like a lot: The Ezra Klein Show, Django Chat and some others where I haven’t yet listened enough to list them here. Advent of Code I knew that Advent of Code existed quite long already but I never dug into it. I participated in the 2022 Advent of Code and enjoyed it a lot. I have long been unsecure regarding my programming skills since I do not have a formal CS background so it felt really good to be able to solve many problems with only a little help. Definitely not all of them though. It definitely was fun and I’m still working through other years a bit. Python is the most fun, JavaScript is sometimes nice. Rust gives me a hard time (or I’m giving myself a hard time) but the upside is that solving even easy puzzles … -
Django News - Django security release for 4.1.6, 4.0.9, and 3.2.17 - Feb 3rd 2023
News Django security releases issued: 4.1.6, 4.0.9, and 3.2.17 The new security release fixes a potential denial-of-service attack. djangoproject.com DjangoCon US 2023 Confirmed It will take place in Durham, North Carolina, at the Durham Convention Center on October 16-20, 2023. More details to come. djangocon.us Articles Python’s “Disappointing” Superpowers Luke Plan's long essay on does Python have Superpowers. lukeplant.me.uk The Django Developer's Guide to Vite An easy way to add JavaScript to your Django projects via Vite, which bills itself as next generation frontend tooling. ctrlzblog.com Django: migrations by choice How to update choice lists in Django models without rolling a migration every time. dev.to Forum django-crispy-forms 2.0a1 - Show & Tell The alpha release for django-crispy-forms is out. This is a widely used package and the maintainers are looking for people to test it out and provide any feedback. djangoproject.com Tutorials Official Django REST Framework Tutorial - A Beginners Guide A 4.1 update to this lengthy beginner-friendly guide to the official Django REST Framework tutorial. Also comes with GitHub repo of the final code. learndjango.com LearnDjango - How to Install Django A beginner-friendly guide to properly installing Django 4.1. It covers the command line, installing Python 3.11, virtual environments, … -
MongoDB - Mark Smith
DjangoCon Europe 2023 @judy2k on Twitter Django Integration with MongoDB DjangoCon Europe 2022 - The (Python) Magic of Django: A Tour of the Codebase PyCon Italia 2022: Stupid Things I’ve Done With Python Everything You Know About Mongo is WrongDjangoCon Europe 2020 - How to Get on This Stage (And What To Do When You Get There) PyCon Australia 2019 - It’s Pythons All the Way Down: Python Types and Metaclasses Made Simple 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. -
Django Static Files and Templates
Static files like CSS, JavaScript, and fonts are a core piece of any modern web application. They are also typically confusing for Django newcomers since Django provides tremendous flexibility around … -
Securing FastAPI with JWT Token-based Authentication
This tutorial shows how to secure a FastAPI application with JWT Token-based Authentication. -
How to Install Django
This tutorial covers how to properly install the latest version of [Django (4.1)](https://www.djangoproject.com/) and [Python (3.11)](https://www.python.org). As the [official docs note](https://docs.djangoproject.com/en/dev/topics/install/), if you are already familiar with the command line, … -
Django News - Bleach derecation - Jan 27th 2023
News Bleach 6.0.0 release and deprecation Bleach, the Python library for sanitizing and linkifying text in HTML, released 6.0.0 and was deprecated because html5lib is no longer actively maintained. bluesock.org The PSF is hiring a Security Developer-in-Residence! The Python Software Foundation (PSF) is happy to announce the launch of a year-long security enhancement initiative that will include a security audit and the creation of a new Security Developer-in-Residence role. blogspot.com Sponsored Ad 5th Annual Python Web Conf Early Bird Tickets On Sale! Early bird tickets (25% off) for the Python Web Conference, organized by Six Feet Up, expire Wednesday, Feb. 1 at 11:59pm ET (UTC -5h). Tickets include 5 days, 65+ live talks, expert-led tutorials, social events, an exclusive pass to all conference recordings for 90 days, cool swag and more. Don’t wait, buy your ticket today! pythonwebconf.com Articles How to simulate a broken database connection for testing in Django An overview of the challenges and three different solutions. neilkakkar.com Reflection on DjangoCon US 2022 Some recaps, favorite talks, and general impressions of DjangoCon US 2022. caktusgroup.com Configuring Sphinx Auto-Doc with projects having Django dependencies How to make it so projects with Django as a dependency benefit from Sphinx's auto-documentation … -
Integrating the Masonite ORM with FastAPI
This tutorial looks at how to use the Masonite ORM with FastAPI. -
Introducing: YAMS (Yet Another Media Server)!
Hello internet 😎 I’m here with a big announcement: I have created a bash script that installs my entire media server, fast and easy 🎉 TL;DR I’ve created YAMS. A full media server that allows you to download and categorize your shows/movies. Go to YAMS’s website here: http://yams.media or check it on Gitlab here: https://gitlab.com/rogs/yams. A little history When I first set up my media server, it took me ~2 weeks to install, configure and understand how it’s supposed to work: Linking Sonarr, Radarr, Jackett together, choosing a good BitTorrent downloader, understanding all the moving pieces, choosing Emby, etc. My plan with YAMS is to make it easier for noobs (and lazy people like me) to set up their media servers super easily. I have been working on YAMS for ~2 weeks. The docker-compose file has existed for almost 2 years but without any configuration instructions. Basically, you had to do everything manually, and if you didn’t have any experience with docker, docker-compose, or any of the services included, it was very cumbersome to configure and understand how everything worked together. So basically, I’m encapsulating my experience for anyone that wants to use it. If you don’t like it, at … -
Introducing: YAMS (Yet Another Media Server)!
Hello internet 😎 I’m here with a big announcement: I have created a bash script that installs my entire media server, fast and easy 🎉 TL;DR I’ve created YAMS. A full media server that allows you to download and categorize your shows/movies. Go to YAMS’s website here: http://yams.media or check it on Gitlab here: https://gitlab.com/rogs/yams. A little history When I first set up my media server, it took me ~2 weeks to install, configure and understand how it’s supposed to work: Linking Sonarr, Radarr, Jackett together, choosing a good BitTorrent downloader, understanding all the moving pieces, choosing Emby, etc. My plan with YAMS is to make it easier for noobs (and lazy people like me) to set up their media servers super easily. I have been working on YAMS for ~2 weeks. The docker-compose file has existed for almost 2 years but without any configuration instructions. Basically, you had to do everything manually, and if you didn’t have any experience with docker, docker-compose, or any of the services included, it was very cumbersome to configure and understand how everything worked together. So basically, I’m encapsulating my experience for anyone that wants to use it. If you don’t like it, at … -
Django News - Django 4.2 Alpha 1 Released - Jan 20th 2023
News Django 4.2 alpha 1 released Django 4.2 alpha 1 is now available. It represents the first stage in the 4.2 release cycle and is an opportunity for you to try out the changes coming in Django 4.2. djangoproject.com Git security vulnerabilities announced tl;dr Upgrade to the latest Git version as soon as possible. github.blog GitHub Copilot Litigation From November 2022 but still relevant. It is a class-action lawsuit against GitHub Copilot which trained its AI systems on public GitHub repositories (and potentially private as well) including Django's. githubcopilotlitigation.com Articles PyDev of the Week: Tim Schilling - Mouse Vs Python Tim is a longtime Django user who currently works on multiple third-party packages including django-debug-toolbar. He also gave a Django debugging tutorial at DjangoCon US last year. pythonlibrary.org Why I Like Nox Tox is a command-line tool that automates testing in multiple Python environments. Nox is a similar tool that aims to simplify the usage of Tox by using standard Python files instead of INI-config files. hynek.me 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 … -
Configuring Sphinx Auto-Doc with projects having Django dependencies
How to make it so projects with Django as a dependency benefit from Sphinx's auto-documentation features. The Problem I want to be able to document open source packages with Sphinx (ex. xocto) and have Sphinx automatically document the Django helpers. This isn't quite the same as documenting a Django project, so I wasn't sure if the otherwise awesome sphinxcontrib-django would be the right tool. Fortunately, there's a solution that doesn't require any additional packages. The Solution Configuration First, in the Sphinx docs folder, create a file called django_settings.py and add the following: """ Minimal file so Sphinx can work with Django for autodocumenting. Location: /docs/django_settings.py """ # INSTALLED_APPS with these apps is necessary for Sphinx to build # without warnings & errors # Depending on your package, the list of apps may be different INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", ] Next, at the top of Sphinx's conf.py, add the following: # docs/conf.py import os import sys import django # Note: You may need to change the path to match # your project's structure sys.path.insert(0, os.path.abspath("..")) # For discovery of Python modules sys.path.insert(0, os.path.abspath(".")) # For finding the django_settings.py file # This tells Django where to find the settings file os.environ["DJANGO_SETTINGS_MODULE"] … -
Multi-Region Python Applications
This article shows at how to enable multi-region support in a Python application. -
Foxley Talent - Jon Gould
Foxley Talent DjangoCon Europe 2022 - Lightning TalkDjango Day Copenhagen - Lightning Talk “Navigating Your Next Job Search” django.social Torchbox AcademyHow to Get Hired as a Django DeveloperSupport 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. -
Why I Like Nox
Ever since I got involved with open-source Python projects, Tox has been vital for testing packages across Python versions (and other factors). However, lately, I’ve been increasingly using Nox for my projects instead. Since I’ve been asked why repeatedly, I’ll sum up my thoughts. -
Python Adventures — Logging
Python Adventures — LoggingThis article assumes that you are familiar with the following:coding in Python 3Python classesPython logging libraryThe purpose of this article is to document how we can use the Python logging library to record/capture/log whatever information we want in more than one destinations in the local filesystem.At the end of this article you should be able to:use the Python logging library to save information from your Python program in selected file destinationslog various types of informationconfigure the logging module to display certain types of informationconfigure the logging module to format the logged informationunderstand how not to use the Python logging libraryBackgroundAs software developers, we often ourselves using the Python print() function for debugging and/or displaying information to ourselves and our program users. What if we want to also capture some of these information in the local filesystem to be studied later or hand off to a third-party? Instead of reinventing the wheel by creating our own library to handle logging, we can take advantage of some of the useful features in the standard Python logging package.Logging LevelsThe Python logging system supports several levels of logging information — CRITICAL, ERROR, WARNING, INFO, DEBUG, and NOTSET. For the purpose of … -
Practice Python Web Projects
I firmly believe that substantial improvement in any skill can only be achieved through practice. With that in mind, I have compiled a list of projects I have built over the years to practice my skills with web frameworks. I hope that these projects, which have proven effective for me in learning frameworks, will also assist you in your growth. These projects are framework-agnostic and can be implemented using FastHTML, Django, Flask, FastAPI, or any other framework of your choice. While some projects may be better suited for certain frameworks, all of them provide valuable practice. All of these projects can be completed using either the default frontend templating system or a frontend framework like React or Vue. The Projects 1. API to Data Creating a web application to present data can be a lot of work. An alternative option is to build an API that returns the data in a well-structured format. This project is a great opportunity to practice using FastHTML, Django REST Framework, Flask, or FastAPI. In fact, it is my understanding that FastAPI was specifically designed for this purpose. Nevertheless, this project can be implemented using any framework and is a valuable practice. Bonus points: Don't … -
Removing comments from my blog
I’m removing comments from my blog. I’ve been thinking about this for a while, but I noticed that comments weren’t being used and most posts were not that interesting. Don’t get me wrong, I really appreciate your awesome comments, but running commento takes a lot of resources and I don’t really see the full benefit of them. From now on, if you want to leave a comment (“thank yous”, suggestions, etc), you can send me an email. You’ll find my email addess on the Contact page. You have a good and relevant comment, I’ll update the relevant post accordingly. -
Removing comments from my blog
I’m removing comments from my blog. I’ve been thinking about this for a while, but I noticed that comments weren’t being used and most posts were not that interesting. Don’t get me wrong, I really appreciate your awesome comments, but running commento takes a lot of resources and I don’t really see the full benefit of them. From now on, if you want to leave a comment (“thank yous”, suggestions, etc), you can send me an email. You’ll find my email addess on the Contact page. You have a good and relevant comment, I’ll update the relevant post accordingly. -
Django News - DjangoCon Edinburgh May 29th - June 2nd - Jan 13th 2023
News DjangoCon Europe is coming to Edinburgh! The website is completed and up now. Dates are May 29th - June 2nd with a Call for Proposals coming soon. djangocon.eu Python 3.12.0 alpha 4 released Python 3.12 is still in development and this is the fourth of seven planned alpha releases. blogspot.com PSF News: Starting 2023 with momentum, thanks to you! The PSF ended their year-end fundraiser and membership drive with over 300 memberships and renewals and raised $61,868 with JetBrains’ generous matching. blogspot.com Articles Environment Files Help You Store Variables A solid description of environment variables and how/why to implement them via a .env file. automationpanda.com Headaches migrating an old postgis database server How to use pgdump --format=custom to get around some issues with migrating a much older legacy database. vanrees.org WebAssembly and its platform targets Brett Cannon answers the question, "What is WebAssembly?" snarky.ca Forum Favorite 3rd Party Environment Variables Package? A Django Forum thread on current options for implementing environment variables. djangoproject.com Sponsored Link Want a fun project for the New Year? Try Wagtail CMS See why Django developers think Wagtail is a “joy to extend.” Trusted by Google, NASA, and many, many others. The #1 Django-powered CMS. … -
Surprising Consequences of macOS’s Environment Variable Sanitization
macOS removes all environment variables starting with DYLD_ as part of its System Integrity Protection (SIP). Depending on how deep you go, the consequences can be surprising. -
Reflection on DjangoCon 2022
Ronard's Recap "It takes a village" the African proverb goes. Nowhere was this as apparent as in DjangoCon. It was my first technology conference and my experience could not have been better. People from the most senior developer to fellow juniors and even one of the co-creators of Django made the experience feel warm and inviting. Perhaps knowing that you are surrounded by introverts alleviates the social pressure, knowing that everyone has a common interest, or perhaps even love for programming also brought a soothing feeling to the experience. I found several of the talks and subjects interesting, but the best part by far was the people behind the stories. It was fascinating to learn that some people are using Django to promote democracy, others to help those in need by providing them with means to access food, and even to help empower social classes by teaching them not only technology skills but also educating them in ways to manage the money they will earn. Those are the things that I took home with me as the plane door closed in sunny San Diego. I attended the conference thinking that I would bring home solely technical skills and maybe a … -
Django News - Django 4.1.5 bugfix released - Jan 6th 2023
News Django bugfix release: 4.1.5 Django 4.1.5 fixes a bug in 4.1.4. Also, the latest string translations from Transifex are incorporated. djangoproject.com Stepping Down as Fellow Carlton Gibson, a Django Fellow since 2018, recently announced plans to step down later this year. noumenal.es WhiteNoise 6.3.0 Release WhiteNoise simplifies static file serving for Python (Django) apps. The most recent update was just released. evans.io Pillow 9.4.0 Release Pillow is the default imaging library for Python and frequently used with Django. The most recent release adds many new features. readthedocs.io Articles Questions to ask a Django company A list of good questions to ask a Django company before you decide to join. better-simple.com How Does Django's StreamingHttpResponse Work, Exactly? A vintage but still relevant post on using Django's StreamingHttpResponse at the WSGI layer. Includes an demo repo, too. andrewbrookins.com How to Create Rows in the Database with Django ORM Demonstrating multiple ways with code to create objects in the database with the Django ORM. ctrlzblog.com Classifying Python virtual environment workflows An overview of current approaches to Python virtual environment workflows and ideas for the future. snarky.ca Forum Django Internals / Mentorship: Looking to get involved? Join the Django community and contribute to … -
Headaches migrating an old postgis database server
Years ago, a database server was installed. Ubuntu 14.04 with postgres 9.3 and postgis 2.1, the standard stuff for 14.04. Over the years, some 450 databases were created by our consultants for various geo-water-related projects. 14.04, so it should have been updated at least four years ago, but we never got around to doing it. It was "only" an internal server, so no priority. Last week, we created a new server and wanted to do a simple pg_dumpall on the old and a psql < all.dump on the new one. Nothing fancy. It was a big 250 GB sql dump file. Ideally, you'd remove unused databases beforehand. But how? It has been in use for eight years. Cleaning up isn't our company's biggest strength. We did send out an email "what can be removed?" but almost nobody answers. Colleagues who made databases seven years ago and don't work at the company don't even receive the email :-) If you don't answer, the database is probably just left alone. "It might be useful later". Well, so a quick pg_dumpall was done. But the restore failed. Then I got called in to see if I could figure something out. It took a … -
Sentry - David Cramer
Sentry@zeeg on TwitterCodecovSupport 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.