All posts in Django
As you start scaling an application out horizontally (adding more servers/instances), you may run into a problem that requires distributed locking. That's a fancy term, but the concept is simple. Sometimes you …
Read More
Single-file Python/Django Deployments
This post covers portions of my talk, Containerless Django, from DjangoCon US 2018.
Deploying Python has improved significantly since I started working with it over a decade ago. We have virtualenv, pip, …
Read More
Cracking Django Password Hashes
By Yann Malet
Most of the Django projects I work with take advantage of django.contrib.auth. It manages
users and groups and is tightly coupled with django.contrib.admin. In this post, we are going to
explore how …
Read More
Goodbye manage.py
Every Django project starts with a manage.py file in its root. It's a convenience script that allows you to run administrative tasks like Django's included django-admin.
In our last post, we discussed …
Read More
Using setup.py in Your (Django) Project
A client recently asked me why all the Django projects we create have a setup.py in the root of the project. Lots of projects get by just fine without one, so why …
Read More
Django Logging, The Right Way
Good logging is critical to debugging and troubleshooting problems. Not only is it helpful in local development, but in production it's indispensable. When reviewing logs for an issue, it's rare to hear …
Read More
Disabling Error Emails in Django
One of Django's nice "batteries included" features is the ability to send emails when an error is encountered. This is a great feature for small sites where minor problems would otherwise go …
Read More
Django Patterns: Fat Models and cached_property
One of my favorite patterns in Django is the combination of "fat" models and cached_property from django.utils.functional.
Fat models are a general MVC concept which encourages pushing logic into methods on your …
Read More
Django Anti-Patterns: Signals
Django's Signal Dispatcher is a really powerful feature that you should never use. Ok, it has valid use cases, but they may be rarer than you think.
First, to dispel a misconception …
Read More
Sharing Media Files Without S3
By Yann Malet
Nowadays, it's common to deploy multiple application servers, but it poses a very common problem; How are these application servers going to share the media files contributed by the users?
Cloud providers …
Read More
Speed Comparison: Putting Pyston and PyPy to the Test
By Yann Malet
The most famous quote to characterize python speed is:
It is fast enough
I have used this quote many times, and I still believe that it applies to most circumstances if you …
Read More
Faster Django Sites with PyPy
This post was created as a collaboration between Lincoln Loop and Maciej Fijalkowski from baroquesoftware.com.
In the space of web architecture, the prevalent belief states that "database based applications are I/O bound". …
Read More
The uWSGI Swiss Army Knife
uWSGI is one of those interesting projects that keeps adding features with every new release without becoming totally bloated, slow, and/or unstable. In this post, we'll look at some of its lesser …
Read More
Loop Letters | Tracy Osborn
The following is the second installment of our Loop Letters series, an interview with Tracy Osborn.
Tracy is the author of Hello Web App, a book to help designers and non-programmers get …
Read More
Fast Immutable Python Deployments
Alternate title: Pip 7 is Awesome, Here's Why
A typical Python deployment looks like this:
Pave the server, setting up a virtualenv and installing any pre-requisites necessary to build/install the Python requirements …
Read More
Concurrency in Python vs GO
By Yann Malet
At Pycon in Montreal few weeks ago I attended a talk that blew my mind away and got me thinking: Python concurrency from the Ground Up: LIVE! by David Beazley. The video …
Read More
High Performance Django Infrastructure Preview
One of the most common requests we've heard since releasing our book, High Performance Django is: "Do you have more code/configuration examples?" It's a pretty loaded question because the book covers everything …
Read More
Introducing High Performance Django Expert Sessions
With the launch of our book, High Performance Django, we’ve received a number of inquiries from people asking for advice, for which the answers are too specific to their application to give …
Read More
Integrating Front-end Tools with Your Django Project
By Marco Louro
Front-end tools like Grunt and Gulp are becoming very widespread, and there’s good reason for it. The front-end code is no longer static, CSS pre-processors are the norm, and JavaScript modules such …
Read More
Django: From Runserver to Reddit Hugs
Last month, I presented High Performance Django: From Runserver to Reddit Hugs at DjangoCon US in Portland. My assertion was that Django, left to its own devices, does not scale. With the …
Read More