From 0f1088a0660b3b1c79a562428089462becc0eac1 Mon Sep 17 00:00:00 2001 From: tyrin Date: Tue, 10 Sep 2024 13:47:46 +0300 Subject: [PATCH] move ingester to be a manage command --- sample_app/management/__init__.py | 0 sample_app/management/commands/__init__.py | 0 .../management/commands/ingester.py | 14 +++++++------- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 sample_app/management/__init__.py create mode 100644 sample_app/management/commands/__init__.py rename ingester.py => sample_app/management/commands/ingester.py (94%) diff --git a/sample_app/management/__init__.py b/sample_app/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sample_app/management/commands/__init__.py b/sample_app/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ingester.py b/sample_app/management/commands/ingester.py similarity index 94% rename from ingester.py rename to sample_app/management/commands/ingester.py index c7abc94..0bc3733 100644 --- a/ingester.py +++ b/sample_app/management/commands/ingester.py @@ -12,14 +12,14 @@ import pandas as pd -#environment init for django -current_dir = os.getcwd() -relative_path = os.path.join(current_dir, 'gaia_orm') -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gaia_orm.settings') +# #environment init for django +# current_dir = os.getcwd() +# relative_path = os.path.join(current_dir, 'gaia_orm') +# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gaia_orm.settings') -sys.path.append(os.path.normpath(relative_path)) -#sys.path.append('/home/kityr/practiceproject/gaia_orm') -django.setup() +# sys.path.append(os.path.normpath(relative_path)) +# #sys.path.append('/home/kityr/practiceproject/gaia_orm') +# django.setup()