Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
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. -
Django News - Happy Django New Year! - Dec 30th 2022
News Python Software Foundation - December 2022 Newsletter In case you missed the PSF's December Newsletter, you might want to check it out to see what is the latest information about what is going on with the PSF and PyCon US 2023. mailchi.mp Articles Electron + Django, desktop app integrate JavaScript & Python Learn how to build a desktop app with Electron and Django in this two-part article. The Django application runs while the desktop app is running. dev.to Making pip installs a little less slow Some valuable advice for speeding up pip install both inside and outside of containers. pythonspeed.com Sponsored Link REVSYS We can help you with your project as experienced Django developers and consultants. Follow our open-source projects on GitHub at https://github.com/revsys to see what we're working on and how we can support you. github.com Events PyCon Italia: Call For Proposals You have until January 15th, 2023, AoE, to submit your talk to PyCon Italia 2023! pycon.it Tutorials Introduction to Custom Actions and Bulk Actions in Django Learn how to add custom and bulk actions to the Django admin dashboard in this tutorial. dev.to Build a fast search UI with Meilisearch, HTMX and Django Learn how to … -
Neovim setup / Tisbury Treasure Hunt / django-stubs - Building SaaS #153
In this episode, I updated and supercharged my editor by switching to Neovim. After that, we did an Exercism excercise that looked at Python tuples. Then I started on a new issues for my SaaS, but pivoted to adding django-stubs to improve the type hinting in the code. -
Neovim setup / Tisbury Treasure Hunt / django-stubs - Building SaaS #153
In this episode, I updated and supercharged my editor by switching to Neovim. After that, we did an Exercism excercise that looked at Python tuples. Then I started on a new issues for my SaaS, but pivoted to adding django-stubs to improve the type hinting in the code. -
Django News - Celebrate the Holiday Season with Django - Dec 23rd 2022
News PSF: More Python Everywhere, All at Once: Looking Forward to 2023 The Python Software Foundation (PSF) needs donations to support education and outreach initiatives in addition to its existing efforts to organize PyCon US and provide funding for smaller Python events and maintain critical infrastructure for Python users. blogspot.com Articles Boring Python: code quality The second post in a series describes how to build, deploy, and manage Python applications in a "boring" and efficient way. b-list.org Django API Domains This styleguide combines domain-driven design principles and Django's apps pattern to provide a pragmatic guide for developing scalable API services with the Django web framework. github.io Django Email/Contact Form Tutorial William Vincent shows us how to create a simple contact form to send Django emails with SendGrid. learndjango.com Forum Why do we need apps? A very interesting and lengthy discussion over at the official Django Forum on apps and their place in Django projects. djangoproject.com Top 5 3rd party packages An older Django Forum thread but still relevant discussing essential 3rd party packages. djangoproject.com Sponsored Ad Django for Beginners/APIs/Professionals Bundle Deal! Great Last Minute Gift! Buy all three for $20 off! Level up your Django knowledge with Django for Beginners, … -
Django LMS - Sheena O'Connell
Umuzi DjangoCon US 2022 Talk: Building a dev-focused learner management system with Django Umuzu on GitHubEleventySupport 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. -
Boring Python: code quality
This is the second in a series of posts I intend to write about how to build, deploy, and manage Python applications in as boring a way as possible. In the first post in the series I gave a definition of what I mean by “boring”, and it’s worth revisiting: 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 … Read full entry -
Django News - Migrations, Playwright, More DjangoCon US Talks - Dec 16th 2022
News 2023 Term Python Steering Council Election Results The results of the 2023 Python Steering Council election are in, and the top five vote-getters are Pablo Galindo Salgado, Gregory P. Smith, Emily Morehouse, Brett Cannon, and Thomas Wouters. python.org Sponsored Ad Django for Beginners/APIs/Professionals Bundle Deal! Buy all three for $20 off! Level up your Django knowledge with Django for Beginners, Django for APIs, or Django for Professionals of gift it to a friend. Sample chapters are available to preview for free. learndjango.com Events PyTexas 2023 CFP The PyTexas conference is now accepting proposals for talks and tutorials to be presented at the conference on April 1 & 2, 2023. pretalx.com Articles Save models with update_fields for better performance in Django An interesting TIL on using update_fields to generate leaner underlying SQL. Probably not advised in most cases but a good learning example. github.io Migrations Of Madness The django-migration-snapshots package allows users to create and manage migration snapshots. This article provides an introduction to the package and explains how to use it. dev.to Running Playwright inside Docker containers Learn how to run Playwright in headed mode to interact with the browser’s user interface from outside Docker containers. oddbird.net Django for … -
Deploying a Django App to Render
This tutorial looks at how to deploy a Django application to Render. -
Django Email/Contact Form Tutorial
Let's build a simple contact form that sends email for a Django 4.1 website. We can take advantage of Django's built-in [email support](https://docs.djangoproject.com/en/dev/topics/email/) to make this relatively painless and then … -
How to change the current query string URL in NextJS v13 with next/navigation
At the time of writing, I don't know if this is the optimal way, but after some trial and error, I got it working. This example demonstrates a hook that gives you the current value of the ?view=... (or a default) and a function you can call to change it so that ?view=before becomes ?view=after. In NextJS v13 with the pages directory: import { useRouter } from "next/router"; export function useNamesView() { const KEY = "view"; const DEFAULT_NAMES_VIEW = "buttons"; const router = useRouter(); let namesView: Options = DEFAULT_NAMES_VIEW; const raw = router.query[KEY]; const value = Array.isArray(raw) ? raw[0] : raw; if (value === "buttons" || value === "table") { namesView = value; } function setNamesView(value: Options) { const [asPathRoot, asPathQuery = ""] = router.asPath.split("?"); const params = new URLSearchParams(asPathQuery); params.set(KEY, value); const asPath = `${asPathRoot}?${params.toString()}`; router.replace(asPath, asPath, { shallow: true }); } return { namesView, setNamesView }; } In NextJS v13 with the app directory. import { useRouter, useSearchParams, usePathname } from "next/navigation"; type Options = "buttons" | "table"; export function useNamesView() { const KEY = "view"; const DEFAULT_NAMES_VIEW = "buttons"; const router = useRouter(); const searchParams = useSearchParams(); const pathname = usePathname(); let namesView: Options = DEFAULT_NAMES_VIEW; const … -
Django News - Django 4.1.4 bugfix release - Dec 9th 2022
News Django bugfix release: 4.1.4 A new bugfix for 5 issues in Django 4.1.3. djangoproject.com DjangoCon US and Europe 2022 Talks Available Online The complete playlists of talks from each conference are now available on YouTube. djangoproject.com Python 3.11.1, 3.10.9, 3.9.16, 3.8.16, 3.7.16, and 3.12.0 alpha 3 are now available New Python releases are available! python.org PSF News: Introducing a New Sliding Scale Membership The Python Software Foundation (PSF) has made a sliding scale option available for Supporting Membership to make membership more accessible and increase the size and diversity of the voting membership. New Supporting Members can join the PSF for as little as $25. blogspot.com Sponsored Ad Django Hosting by CodeRed Cloud At CodeRed, we’re striving to build the world’s easiest Django hosting platform. Go from polls tutorial to production in just a few minutes. Get started with a free account which includes a MariaDB or Postgres database, static + media hosting, and everything you need to run a Django site. No AWS, S3, Docker, or 3rd-party services required! codered.cloud Events PyCon US 2023 Registration Launch! Registration for PyConUS 2023 is OPEN! The first 500 tickets sold are discounted. blogspot.com Articles Docker compose with Django 4, Celery, Redis … -
How to Get Hired as a Django Developer
Hiring developers is a famously non-linear problem. Once you have a job at a notable company, it seems recruiters constantly beat down your door. But how do you get started? … -
Django Sitemap Tutorial
A vital part of modern SEO (Search Engine Optimization) is to have a sitemap, an XML file that tells a search engine how often a page is updated and how …