mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed settings and manage.py location for tests/django console/manage.py tasks
in case of complicated project structure
This commit is contained in:
@@ -11,7 +11,10 @@ try:
|
||||
except ImportError:
|
||||
from runpy_compat import run_module
|
||||
|
||||
manage_file = 'manage'
|
||||
manage_file = os.getenv('PYCHARM_DJANGO_MANAGE_MODULE')
|
||||
if not manage_file:
|
||||
manage_file = 'manage'
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
fixGetpass()
|
||||
|
||||
@@ -10,10 +10,11 @@ except ImportError:
|
||||
from runpy_compat import run_module
|
||||
|
||||
|
||||
def run():
|
||||
def run(working_dir):
|
||||
sys.path.insert(0, working_dir)
|
||||
manage_file = os.getenv('PYCHARM_DJANGO_MANAGE_MODULE')
|
||||
if not manage_file:
|
||||
manage_file = 'manage'
|
||||
manage_file = 'manage'
|
||||
|
||||
def execute_manager(settings_mod, argv = None):
|
||||
management.setup_environ(settings_mod)
|
||||
|
||||
@@ -8,7 +8,10 @@ base_path = sys.argv.pop()
|
||||
sys.path.insert(0, base_path)
|
||||
os.chdir(base_path)
|
||||
|
||||
manage_file = 'manage'
|
||||
manage_file = os.getenv('PYCHARM_DJANGO_MANAGE_MODULE')
|
||||
if not manage_file:
|
||||
manage_file = 'manage'
|
||||
|
||||
try:
|
||||
__import__(manage_file)
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user