(you cannot alter to or from M2M fields, or add or remove through= on M2M fields)

Perhaps you’ve experienced this… You have a ManyToManyField field in a model and want to update to using a through table to add additional fields. You update your models.py, make migrations, all looks good, then you hit this error when attempting to migrate:

you cannot alter to or from M2M…

How to setup django cache backends with Redis, Redis Sentinel, and Redis cluster

Django supports many different backends for various caching needs. One of the most popular solutions is Redis, an in-memory key-value database. While integration with a single Redis node is quite straight forward, integration with high-availability (HA) Redis…

For multiple reasons, including security and historical tracking, it can be advantageous to record use login/logout activity for a service. In this post we’ll look at using signals to log such activity in a Django project.

Getting Started

To get started, let’s first understand logging configuration in Django. As a matter of…

In this tutorial we will setup, configure, and test a redis cluster using redis 5.0.6 on CentOS7.

We are working under the impression that our redis cluster will be spread across three separate regions (let’s call those us-west, us-central, and us-east),
and we want to ensure high availability and data redundancy…


Automation Engineer & Django Fan

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store