I have a problem while trying to create a migration. manage.py behaves very strangely - it accepts the arguments that are given for the schema and the answers that I provided a nonexistent option.
When i started
I get
Usage: manage.py [options] manage.py: error: no such option: --initial
EDIT: I get the same problem when I pass any argument to any manage.py command, e.g.
../manage.py runserver
I have done the same thing many times before, and I have never had such problems. It worked on my local server, and when I tried to configure the remote server, I had this problem.
My manage.py file looks like this:
#!/usr/bin/env python import os import sys def isProduction(): import socket if socket.gethostname().startswith('ip'): return True return False if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") if isProduction(): os.environ.setdefault('DJANGO_CONFIGURATION', 'ProdSettings') else: os.environ.setdefault('DJANGO_CONFIGURATION', 'DevSettings') from configurations.management import execute_from_command_line execute_from_command_line(sys.argv)
I use django configurations, but this should not cause any problems (it worked several times before). I think the problem is elsewhere. Any ideas what might cause such a weird problem?
source share