1

Hi I have different instances of the same project that use different settings file, so for each instance I have different argument for manage.py

python manage.py <some_command> --settings=some_settings

And I want to create scrips with different manage.py commands that I can reuse in these different instances and I also want to execute commands by hand.

So, is there a way to have the --settigns=some_settings come from the environment? So I can reuse the scripts and also not have to retype that everytime I call manage.py.

Thanks!!!

Martin Massera
  • 1,718
  • 1
  • 21
  • 47

1 Answers1

2

Yes. You should use DJANGO_SETTINGS_MODULE environment variable.

https://docs.djangoproject.com/en/1.8/topics/settings/#designating-the-settings

Alexander Sysoev
  • 825
  • 6
  • 16