0

I'm using Django1.11.5 and I created makemessages.py file in "my-app/management/commands/" directory to customise makemessages command.

And I made it to execute this command by running "python ../manage.py makemessages" from my-app directory.

But I want to execute by "django-admin makemessages -l ja". (Running "django-admin makemessages -l ja" just executes default makemessages command)

Is there any way to execute this customised command by running "django-admin makemessages -l ja"?

1 Answers1

0

I believe it should work if you did all right. Take a look at this docs part:

In addition, manage.py is automatically created in each Django project. manage.py does the same thing as django-admin but takes care of a few things for you:

  • It puts your project’s package on sys.path.

  • It sets the DJANGO_SETTINGS_MODULE environment variable so that it points to your project’s settings.py file.

Carefully check this two moments. Since your manage.py works as expected, you already added your app in INSTALLED_APPS (after that Django can find and override default management command).

Community
  • 1
  • 1
Sergei Zherevchuk
  • 562
  • 1
  • 5
  • 14