Skip to content

Instantly share code, notes, and snippets.

@jourdanrodrigues
Last active April 18, 2017 18:32
Show Gist options
  • Save jourdanrodrigues/51395f028819daf02c54c9a6c3c76904 to your computer and use it in GitHub Desktop.
Save jourdanrodrigues/51395f028819daf02c54c9a6c3c76904 to your computer and use it in GitHub Desktop.
A custom "makemessages" Django 1.11 command to exclude environment code (meant for who uses the environment inside the project).
from django.core.management.commands import makemessages
class Command(makemessages.Command):
def handle(self, *args, **options):
options['ignore_patterns'] += ['env', 'venv']
super(Command, self).handle(*args, **options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment