diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..d04ebb1 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,5 @@ +#!/bin/sh +echo "poetry export req" +pwd +~/.local/bin/poetry install +~/.local/bin/poetry export --without-hashes --format=requirements.txt > back/requirements.txt \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4ae0e5c..ca3ab0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .venv poetry.lock files/* -.vscode/ \ No newline at end of file +.vscode/ +.env \ No newline at end of file diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json index 31ff75e..2417297 100644 --- a/.vscode/PythonImportHelper-v2-Completion.json +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -1,4 +1,39 @@ [ + { + "label": "annotations", + "importPath": "__future__", + "description": "__future__", + "isExtraImport": true, + "detail": "__future__", + "documentation": {} + }, + { + "label": "os", + "kind": 6, + "isExtraImport": true, + "importPath": "os", + "description": "os", + "detail": "os", + "documentation": {} + }, + { + "label": "site", + "kind": 6, + "isExtraImport": true, + "importPath": "site", + "description": "site", + "detail": "site", + "documentation": {} + }, + { + "label": "sys", + "kind": 6, + "isExtraImport": true, + "importPath": "sys", + "description": "sys", + "detail": "sys", + "documentation": {} + }, { "label": "json", "kind": 6, @@ -97,15 +132,6 @@ "detail": "gyp.common", "documentation": {} }, - { - "label": "os", - "kind": 6, - "isExtraImport": true, - "importPath": "os", - "description": "os", - "detail": "os", - "documentation": {} - }, { "label": "posixpath", "kind": 6, @@ -249,15 +275,6 @@ "detail": "code", "documentation": {} }, - { - "label": "sys", - "kind": 6, - "isExtraImport": true, - "importPath": "sys", - "description": "sys", - "detail": "sys", - "documentation": {} - }, { "label": "hashlib", "kind": 6, @@ -1605,70 +1622,6 @@ "detail": "django.db", "documentation": {} }, - { - "label": "migrations", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, - { - "label": "models", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, - { - "label": "migrations", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, - { - "label": "models", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, - { - "label": "migrations", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, - { - "label": "models", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, - { - "label": "migrations", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, - { - "label": "models", - "importPath": "django.db", - "description": "django.db", - "isExtraImport": true, - "detail": "django.db", - "documentation": {} - }, { "label": "models", "importPath": "django.db", @@ -1880,6 +1833,87 @@ "detail": "django.core.wsgi", "documentation": {} }, + { + "label": "bin_dir", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "bin_dir = os.path.dirname(abs_file)\nbase = bin_dir[: -len(\"bin\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "base", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "base = bin_dir[: -len(\"bin\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "os.environ[\"PATH\"]", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "os.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "os.environ[\"VIRTUAL_ENV\"]", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "os.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "os.environ[\"VIRTUAL_ENV_PROMPT\"]", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "os.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "prev_length", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "prev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "sys.path[:]", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "sys.real_prefix", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "sys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, + { + "label": "sys.prefix", + "kind": 5, + "importPath": ".venv.bin.activate_this", + "description": ".venv.bin.activate_this", + "peekOfCode": "sys.prefix = base", + "detail": ".venv.bin.activate_this", + "documentation": {} + }, { "label": "_Known", "kind": 6, @@ -8423,42 +8457,6 @@ "detail": "back.api.migrations.0006_product_image2_product_image3", "documentation": {} }, - { - "label": "Migration", - "kind": 6, - "importPath": "back.api.migrations.0007_floorplan_alter_product_image1_alter_product_image2_and_more", - "description": "back.api.migrations.0007_floorplan_alter_product_image1_alter_product_image2_and_more", - "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0006_product_image2_product_image3'),\n ]\n operations = [\n migrations.CreateModel(\n name='Floorplan',\n fields=[\n ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n ('title', models.CharField(max_length=200)),", - "detail": "back.api.migrations.0007_floorplan_alter_product_image1_alter_product_image2_and_more", - "documentation": {} - }, - { - "label": "Migration", - "kind": 6, - "importPath": "back.api.migrations.0008_alter_floorplan_np_field", - "description": "back.api.migrations.0008_alter_floorplan_np_field", - "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0007_floorplan_alter_product_image1_alter_product_image2_and_more'),\n ]\n operations = [\n migrations.AlterField(\n model_name='floorplan',\n name='np_field',\n field=models.TextField(),\n ),", - "detail": "back.api.migrations.0008_alter_floorplan_np_field", - "documentation": {} - }, - { - "label": "Migration", - "kind": 6, - "importPath": "back.api.migrations.0009_alter_floorplan_np_field", - "description": "back.api.migrations.0009_alter_floorplan_np_field", - "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0008_alter_floorplan_np_field'),\n ]\n operations = [\n migrations.AlterField(\n model_name='floorplan',\n name='np_field',\n field=models.BinaryField(),\n ),", - "detail": "back.api.migrations.0009_alter_floorplan_np_field", - "documentation": {} - }, - { - "label": "Migration", - "kind": 6, - "importPath": "back.api.migrations.0010_alter_floorplan_np_field", - "description": "back.api.migrations.0010_alter_floorplan_np_field", - "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0009_alter_floorplan_np_field'),\n ]\n operations = [\n migrations.AlterField(\n model_name='floorplan',\n name='np_field',\n field=models.TextField(),\n ),", - "detail": "back.api.migrations.0010_alter_floorplan_np_field", - "documentation": {} - }, { "label": "ApiConfig", "kind": 6,