Posts by Lacey Williams Henschel

Lacey Henschel

Pro-Tip - A Tip About DRF Permissions

I needed to structure permissions in an API view that had multiple user roles, and I learned about using the & (and), | (or) and ~ (not) operators with Django REST Framework permissions.

Lacey Henschel

Custom Exceptions in Django REST Framework

I was working on a project with a coworker recently and I noticed in one of their pull requests that they used a custom exception in one of our Django REST Framework viewsets. I prefer this way to what I was doing before, so I wanted to share it with you!

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

Using Different Read and Write Serializers in Django REST Framework

On a recent project, we needed to use different serializers for GET vs POST/PUT/PATCH requests to our API. Read on to learn how we used a mixin to accomplish this goal.

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.

Lacey Henschel

Today I Learned - Celery and Django and Docker: Oh My!

In this post, you will learn how to create a Celery task inside a Django project in a Docker container. Sounds awesome, right?

Lacey Henschel

Today I Learned - Docker: Useful Command Line Stuff

Let’s talk about what it’s like to actually use Docker in your day-to-day.

Lacey Henschel

Today I Learned - A Brief Intro to Docker for Djangonauts

Lacey didn't have the opportunity to work with Docker at her last job. In this tidbit she steps you through getting started with Docker for Django developers.