Posts tagged "django"

Frank Wiles

Pro-Tip – Sometimes LFU > LRU

Stop letting bot traffic evict your customers' sessions. A simple Redis configuration switch from LRU to LFU solved our crawler problem, with a Django configuration example.

Frank Wiles

devdata - Improving developer velocity and experience

Developers are the largest expense with software. Improving their productivity doesn't just make sense to the company's bottom line, but it improves morale as they no longer have to wade through a bunch of crap to get started on the job at hand. This data generation technique helps improve your developer experience and testing.

Lacey Henschel

How to Add Django Models to the Wagtail Admin

When working with Wagtail, you might find that you're using Wagtail Page models for some of your database models, but regular Django models for others. In this post, learn how to add your Django models to the Wagtail admin to make managing multiple types of models easier.

Lacey Henschel

Tips for Using Django's ManyToManyField

ManyToManyFields confuse a lot of people. The way you relate objects to each other is just different enough from dealing with ForeignKeys and just uncommon enough in day-to-day Django development that it's easy to forget all the little tricks for dealing with them.

Flavio Curella

Pro-Tip – Slugs as primary keys

A very common pattern in a Django Project is to have some kind of 'model-type' relationship, where you have some kind of object that can only belong to one of the types defined in the database.

Frank Wiles

Pro-Tip – Python: atexit

Python's atexit handler is one of those things people should use more often.  Some developers aren't even aware that it exists and that makes me sad.