Send a text to yourself from Django
Yes. Homing Pigeon (homingpigeon.dev) lets your Django app text your phone when something you care about is saved, like a new order. The text goes out after the database commits, a failed text never breaks the request, and your coding agent can add it to the app you already have.
What to tell your agent
Use Homing Pigeon to text me from this Django app when a new order comes in.
Your agent asks for your number, you read back the six-digit code, and it does the rest.
How it works in code
After pip install homingpigeondev, add this helper to your app as notify.py:
import logging
import homingpigeondev
from django.db import transaction
logger = logging.getLogger(__name__)
def _send(message, key):
try:
homingpigeondev.send(message, idempotency_key=key, timeout=5)
except homingpigeondev.HomingPigeonError as err:
logger.warning("Text alert failed: %s", err)
def text_me(message, key=None):
transaction.on_commit(lambda: _send(message, key))
Then have a post_save signal call it. This one, in signals.py, texts you when a new Order is saved. Use your own model and fields:
from django.db.models.signals import post_save
from django.dispatch import receiver
from .models import Order
from .notify import text_me
@receiver(post_save, sender=Order)
def order_placed(sender, instance, created, **kwargs):
if created:
text_me(f"New order {instance.pk} for ${instance.total}.", f"order-{instance.pk}")
Good to know
transaction.on_commitholds the text until the order is saved for good. If the transaction rolls back, no text goes out. If no transaction is open, it sends right away.- The
trymeans a failed or slow text never turns the request into an error. The failure goes to your log instead, andtimeout=5caps how long a send can hold up the response. - Django runs the receiver only once
signals.pyis imported. In your app'sapps.py, give the config class areadymethod that runsfrom . import signals. createdis true only on the first save, so editing an order later stays quiet. Orders made withbulk_createskippost_save, so they do not text you.- The order ID in the idempotency key means you get at most one text per order. Tests that use Django's
TestCasenever text you, because their transactions never commit. - On your server, set
HOMINGPIGEON_API_KEYin the app's environment. After you verify your phone,npx -y homingpigeondev keyprints the key. On your own machine, runpython -m homingpigeondev verify +15551234567, then again with the six-digit code it texts you, and the key is saved for you. - Messages are limited to 480 characters and go only to the US mobile number you verified. Keep them plain, with no links. Delivery is not guaranteed, so treat each text as a heads-up.
Get started
Add Homing Pigeon to Claude Code, then ask for what you want:
claude mcp add homingpigeondev -- npx -y homingpigeondev mcp
You get 50 free texts every month, on US mobile numbers. See more use cases.