Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Managing a Django Project with Poetry
Poetry is relatively new packaging and dependency manager. It makes it very easy to upload libraries to PyPI, manage dependencies visually, and has a couple of handy features. Today, I'm not going to do a deep dive into how Poetry works and all its features. Today I just want to focus on how to configure it for a Django project. -
Django News - All About Deployment - Feb 18th 2022
News Python Software Foundation: We are hiring contract developers to build new features in PyPI The Python Software Foundation has funding available for designing, developing and deploying organization accounts in PyPI. blogspot.com Trends and Insights Trends and Insights for February 18th 🏈 If you are curious about what Super Bowl LVI traffic looks like, Cloudflare gave us all the details. 📈 Python Package Index (PyPI) was trending this week and announced that they served 126,545,477,066 downloads in 2021. 🔒 If you upload packages to the PyPI, do you have Two Fator Auth (2FA) enabled? 📅 DjangoCon US is back in San Diego, CA, October 16-21. 💬 Mike Driscoll started a discussion about your favorite feature in #Django and add-on package? Django Newsletter Sponsored Ad Django Styleguide - A styleguide for Django projects, big and small. github.com Events San Diego Python Users Group - Virtual Meetup (2/24/22) Three talks on creating a REST API with Django Rest Framework, Django REST with Machine Learning, and designing as a developer. meetup.com PyTexas 2022 Schedule is live! The PyTexas 2022 Schedule is live and features several friendly Django developers. pytexas.org Articles Instructions to Deploy Django, Django Channels to AWS A helpful step-by-step guide to … -
Asynchronous Tasks with Flask and Celery
This tutorial looks at how to configure Celery to handle long-running tasks in a Flask app. -
Upgrade to Tailwind CSS v3 - Building SaaS with Python and Django #127
In this episode, I upgraded my app to switch from Tailwind CSS v2 to v3. We worked through the migration guide to make all the needed changes to work with v3. Then I upgraded my development tools to make Tailwind updates as I develop my templates. -
Django Deployments - Eric Matthes
django-simple-deployPython Crash Course recommended readingsPython Crash Course book Python on Azure 4-Part Series with CarltonLocust.io: Open source load testing toolSupport 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. -
That Wild Ask A Manager Story
Ask A Manager had a wild story a week ago. A company interviewed someone, hired him, but when he showed up for work … it was a totally different person. A friend asked, “if this was your hire, and you manager asked you to change your hiring practices to prevent this, what would you do?” Nothing. I would do nothing. Here’s why. -
I was on The Changelog
I was on The Changelog, talking about work sample tests and hiring in general. Listen wherever you get your podcasts, or right here. -
Django News - Wagtail 2.16 Released - Feb 11th 2022
News Wagtail 2.16 Wagtail 2.16 adds support for Django 4.0 and dozens of features and improvements. github.com DEFNA Board Member Recruitment Django Events Foundation North America (DEFNA) is looking for another board member who is interested in growing the DjangoCon US community. djangoproject.com Wagtail’s domain migration The Wagtail team decided to migrate their wagtail.io domain to a wagtail.org domain. wagtail.org Trends and Insights Trends and Insights for February 11th 🍏 Jen Simmons, from Apple, asked the web community for meaningful feedback to help address issues with their Safari browser. 🖤 The Django codebase is now formatted with Black. ⚡ Django Snippets is now using htmx on their front page and they are looking for new contributors. This continues the trend of more and more projects starting to adopt htmx. 🌍 Do you remember your first DjangoCon Europe? The team wants to know. ✏️ Writing a "Hello Wordle" app might be the new writing "Hello world" in your favorite framework. 🐍 Python Core Devs are discussing "Removing dead batteries" from Python 3.13. 🐘 After you upgrade to Postgres 14, you need to reindex all of your indexes because glibc changed how data is internally sorted. 📘 Kalob Taulien announced that he … -
Speaking at Python Web Conf
During the week of March 21-25 at Python Web Conf I'm giving my first public conference talk in three years. I'm both excited and apprehensive about returning to the speaker's podium. To me, public speaking is like a roller coaster ride. The climb up the first hill (or minute when it comes to speaking) is absolutely terrifying. Then as soon as the car accelerates (or I begin to speak), endorphins kick in. I go from struggling not to visibly tremble from fear to shaking with excitement. The talk I'm going to give is titled, "Confessions of Joe Developer". Here's the synoposis: Over the course of 17 years of professional Python development at Octopus Energy, NASA, and various agencies, Daniel Roy Greenfeld has picked up a lot of easy tricks stolen from the best and brightest in the software community that make him look good in front of his peers and colleagues. And now, at great risk to his career and reputation, he is going to show you how he does it. What that description doesn't tell you is that I came up with the core concepts of that talk in the middle of my interviews to work at NASA at … -
Announcing WhiteNoise 6
WhiteNoise is a simple solution to serving static assets. It lets you skip configuring a separate web server for your static assets, and serve them straight from Django. It’s a brilliant tool. I’ve used it for years on various projects, and I’ve recommended it many times, and mentioned it in several blog posts. WhiteNoise was created by Dave Evans in 2013. I’ve met Dave several times at the London Django Meetup. Recently the project’s maintenance was getting a bit backlogged, so I volunteered to help and Dave accepted :) I got to work adding support for modern Python and Django versions, dropping old ones, and merging in a few feature requests. I just released these accumulated changes as version 6.0.0. Nothing drastic has changed for the major version bump - most users should not be affected. setuptools’s python_requires field also ensures users on outdated Python versions still install older WhiteNoise versions. But there are enough changes that it felt like a major number was needed, and version numbers are cheap. Here are the changelog entries for 6.0.0: Drop support for Python 3.5 and 3.6. Add support for Python 3.9 and 3.10. Drop support for Django 1.11, 2.0, and 2.1. Add … -
Working with Static and Media Files in Django
This article looks at how to work with static and media files in a Django project, locally and in production. -
Setting Your Sites
Full show notes are available at https://www.mattlayman.com/django-riffs/16. -
Episode 16 - Setting Your Sites
On this episode, we look at how to manage settings on your Django site. What are the common techniques to make this easier to handle? Let’s find out! Listen at djangoriffs.com or with the player below. Last Episode On the last episode, we dug into sessions and how Django uses that data storage technique for visitors to your site. How Is Django Configured? To run properly, Django needs to be configured. -
typing.Protocol Across Python Versions
How to seamlessly support typing.Protocol on Python versions older and newer than 3.8. At the same time. -
Django News - Django security releases issued: 4.0.2, 3.2.12, and 2.2.27 - Feb 4th 2022
News Django security releases issued: 4.0.2, 3.2.12, and 2.2.27 Multiple security updates in this release. We encourage all users of Django to upgrade as soon as possible. djangoproject.com Want to host DjangoCon Europe 2023? If you have ever wanted to host and run DjangoCon Europe, the DSF welcomes your proposal. djangoproject.com Black (22.1.0) is out of beta At long last, Black is no longer a beta product! This is the first non-beta release and the first release covered by a new stability policy. Django has committed to incorporating Black once this milestone was reached per DEP 8. github.com Google sponsors Wagtail CMS's next-generation web content management experience When Google saw the roadmap of enhancements ahead for Wagtail, they realized how much their team will benefit and decided to provide $150,000 of corporate sponsorship to accelerate the development effort. prnewswire.com Open Source Credit Survey The University of Vermont team is conducting a survey about how people receive credit for the tasks they do as part of open source projects. dev.to Heads up: pip-compile fails with pip 22.0 pip==22.0 broke pip-tools. github.com Trends and Insights Trends and Insights for the first week of February 2022 🗑 Apple is officially removing Python 2.7 … -
Admin Interface For PDFs - Building SaaS with Python and Django #126
In this episode, I need tools to inspect some PDF reports that I’m building that customers of my homeschool app will use at the end of the school year. I build the admin tools that allow me to see these PDFs quickly. -
Django Testing and Debugging - Karen Tracey
Karen Tracey at Cactus groupDjango 1.1 Testing and Debugging Caktus Group: Auto Scaling Online SurveyKaren joining the DSF BoardSupport 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. -
Developing a Values Interview Question
How do you develop an interview question that measures a core value? -
Save a Django Query to the Database
I found a StackOverflow question on saving a Django query to the database, but I was left super unclear on what to do. There’s all this talk about… -
Save a Django Query to the Database
I found a StackOverflow question on saving a Django query to the database, but I was left super unclear on what to do. There’s all this talk about pickling and serialization that I’m sure makes a ton of sense to someone smarter than me. The current answer is old, however, and in 2022, I found another solution: turning a dict into JSON. Plus, I found a way to make it work with my htmx live search, allowing me to view the results of my query on the front end of my site (read: pretty) to double-check that things look okay before saving. I’ll show you what I did below. I believe pickling still works, so at the end I will show some more thoughts there. models.py - example database structure class Transaction(models.Model): id = models.CharField(max_length=24, primary_key=True) date = models.DateField(null=False) amount = models.IntegerField(null=False) info = models.CharField() account = models.ForiegnKey(Account, on_delete=models.SET_NULL, null=True) category = models.ForeignKey(Category, on_delete=models.SET_NULL, null=True, blank=False, default=None) class Account(models.Model): name = models.CharField() email = models.EmailField() class Category(models.Model): name = models.CharField(unique=True) class Rule(models.Model): category = models.ForeignKey(Category, on_delete=models.SET_NULL, blank=False, null=True, default=None) criteria = models.JSONField(default=dict) # this will hold our query My models store financial transactions, the category the transaction fits into (e.g., … -
Django News - DjangoCon Europe 2022 - Jan 28th 2022
News Announcing DjangoCon Europe 2022 DjangoCon Europe 2022 is back again and it’s going to be five full days of talks, tutorials, and sprints September 21-25, 2022. djangoproject.com Django Styleguide Survey HackSoft is running a survey on current Django style usage which will be used to update its open source Django Styleguide. hacksoft.io Trends and Insights Trends and Insights for January So much happens on social media that doesn't always get covered in traditional articles, and we wanted to experiment with an occasional Trends and Insights section. Let us know if you like the idea and what you think. We might make it a more permanent part of our newsletter if it's well-received. 🐍 CPython's main branch now compiles to WebAssembly, which means that Python will run natively in your web browser. Check out Katie Bell's "How to run Python in the browser" talk from LCA 2022. 🥚 Dustin Ingram shared some packaging insights that, as of December 2021, less than 1% of all uploading PyPI packages include .egg files. Python eggs are effectively deprecated. 🧪 Jamie Matthews shared a nice PyQuery snippet that makes testing for exact text easier in a reply thread about Django Template tips, tricks, and … -
Ordering Existing Models - Building SaaS with Python and Django #125
In this episode, we built out a customer requested feature of adding order of grade levels within the school year of my homeschool app. This will allow users to change the display of crucial pages within the app. -
How to Set Up Source Maps with Django
Source maps are files that map your minified CSS or JavaScript back to the original code. They allow you to use your browser’s development tools to debug minified code as if it were the original. In this post we’ll look at how source maps fit into Django’s static files infrastructure, including a couple recent changes I made to Django to better support them. We’ll look at using a JavaScript source map, but everything applies equally to CSS source maps. Alrighty, let’s dig in. Directory Layout Let’s look at an example project using source maps to see how they fit into Django’s infrastructure. This project demonstrates a static file setup that works well for most projects. The project has three directories for “static files” with different roles, all in the root of repository: frontend/, which contains the source CSS and JavaScript files. Django doesn’t use this directory at all. Frontend tools, like bundlers, should process the source files in frontend/ and place output files in the next directory, static/. This provides a clear “hand off”. static/, which contains static files for Django to manage. This is in the STATICFILES_DIRS setting: STATICFILES_DIRS = [BASE_DIR / "static"] static_root/, which is created by Django’s … -
For hire
As I write this it’s the evening of January 23, 2022. A little over two weeks ago I gave notice at my now-former employer, and as of two days ago I am officially on the job market. If you already know me and are interested in talking about an opportunity, please get in touch. Or if you want to know a bit more first, read on… Who I am It’s a bit tricky to pin down when … Read full entry -
Django Rest Framework authentication: the easy way
In this tutorial you'll learn how to implement Django Rest Framework authentication in your web application by leveraging the built-in Django session framework. This approach is way simpler (and secure) than other popular methods such as JWT, and has only one requirement: your frontend (think Vue.js, React, ...) and your backend should be served by the same domain. I created an example project on GitHub you can use to follow along with this tutorial. Table of Contents Why you should avoid JWT for Django Rest Framework authentication Django Rest Framework settings Django Rest Framework authentication endpoint Test authentication using HTTPie A new endpoint to retrieve the user profile Test the user profile endpoint using HTTPie Conclusions Why you should avoid JWT for Django Rest Framework authentication JWT (Json Web Token) is a very popular method to provide authentication in APIs. If you are developing a modern web application with Vue.js or React as the frontend and Django Rest Framework as the backend, there is an high probability that you are considering JWT as the best method to implement authentication. The reality is that JWT is just one method, and unfortunately not the simpler, nor the most reliable. JWT is not …