About Translatable Strings and Migrations
If you want to make sure that the translations of verbose names and help texts won't have an effect on your Django migrations, you can optionally import gettext_noop
as _
in the models.py
when the makemigrations
management command is called.
import sys
if "makemigrations" in sys.argv:
from django.utils.translation import gettext_noop as _
else:
from django.utils.translation import gettext_lazy as _
Tips and Tricks Programming Development Translations Django 5.x Django 4.2 Django 3.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.