[ { "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": "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", "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", "description": "django.db", "isExtraImport": true, "detail": "django.db", "documentation": {} }, { "label": "models", "importPath": "django.db", "description": "django.db", "isExtraImport": true, "detail": "django.db", "documentation": {} }, { "label": "django.db.models.deletion", "kind": 6, "isExtraImport": true, "importPath": "django.db.models.deletion", "description": "django.db.models.deletion", "detail": "django.db.models.deletion", "documentation": {} }, { "label": "admin", "importPath": "django.contrib", "description": "django.contrib", "isExtraImport": true, "detail": "django.contrib", "documentation": {} }, { "label": "admin", "importPath": "django.contrib", "description": "django.contrib", "isExtraImport": true, "detail": "django.contrib", "documentation": {} }, { "label": "admin", "importPath": "django.contrib", "description": "django.contrib", "isExtraImport": true, "detail": "django.contrib", "documentation": {} }, { "label": "admin", "importPath": "django.contrib", "description": "django.contrib", "isExtraImport": true, "detail": "django.contrib", "documentation": {} }, { "label": "AppConfig", "importPath": "django.apps", "description": "django.apps", "isExtraImport": true, "detail": "django.apps", "documentation": {} }, { "label": "AppConfig", "importPath": "django.apps", "description": "django.apps", "isExtraImport": true, "detail": "django.apps", "documentation": {} }, { "label": "AppConfig", "importPath": "django.apps", "description": "django.apps", "isExtraImport": true, "detail": "django.apps", "documentation": {} }, { "label": "json", "kind": 6, "isExtraImport": true, "importPath": "json", "description": "json", "detail": "json", "documentation": {} }, { "label": "routers", "importPath": "rest_framework", "description": "rest_framework", "isExtraImport": true, "detail": "rest_framework", "documentation": {} }, { "label": "serializers", "importPath": "rest_framework", "description": "rest_framework", "isExtraImport": true, "detail": "rest_framework", "documentation": {} }, { "label": "viewsets", "importPath": "rest_framework", "description": "rest_framework", "isExtraImport": true, "detail": "rest_framework", "documentation": {} }, { "label": "status", "importPath": "rest_framework", "description": "rest_framework", "isExtraImport": true, "detail": "rest_framework", "documentation": {} }, { "label": "routers", "importPath": "rest_framework", "description": "rest_framework", "isExtraImport": true, "detail": "rest_framework", "documentation": {} }, { "label": "serializers", "importPath": "rest_framework", "description": "rest_framework", "isExtraImport": true, "detail": "rest_framework", "documentation": {} }, { "label": "viewsets", "importPath": "rest_framework", "description": "rest_framework", "isExtraImport": true, "detail": "rest_framework", "documentation": {} }, { "label": "logging", "kind": 6, "isExtraImport": true, "importPath": "logging", "description": "logging", "detail": "logging", "documentation": {} }, { "label": "TestCase", "importPath": "django.test", "description": "django.test", "isExtraImport": true, "detail": "django.test", "documentation": {} }, { "label": "TestCase", "importPath": "django.test", "description": "django.test", "isExtraImport": true, "detail": "django.test", "documentation": {} }, { "label": "TestCase", "importPath": "django.test", "description": "django.test", "isExtraImport": true, "detail": "django.test", "documentation": {} }, { "label": "io", "kind": 6, "isExtraImport": true, "importPath": "io", "description": "io", "detail": "io", "documentation": {} }, { "label": "base64", "kind": 6, "isExtraImport": true, "importPath": "base64", "description": "base64", "detail": "base64", "documentation": {} }, { "label": "cv2", "kind": 6, "isExtraImport": true, "importPath": "cv2", "description": "cv2", "detail": "cv2", "documentation": {} }, { "label": "numpy", "kind": 6, "isExtraImport": true, "importPath": "numpy", "description": "numpy", "detail": "numpy", "documentation": {} }, { "label": "JSONParser", "importPath": "rest_framework.parsers", "description": "rest_framework.parsers", "isExtraImport": true, "detail": "rest_framework.parsers", "documentation": {} }, { "label": "MultiPartParser", "importPath": "rest_framework.parsers", "description": "rest_framework.parsers", "isExtraImport": true, "detail": "rest_framework.parsers", "documentation": {} }, { "label": "APIView", "importPath": "rest_framework.views", "description": "rest_framework.views", "isExtraImport": true, "detail": "rest_framework.views", "documentation": {} }, { "label": "JsonResponse", "importPath": "django.http", "description": "django.http", "isExtraImport": true, "detail": "django.http", "documentation": {} }, { "label": "get_object_or_404", "importPath": "django.shortcuts", "description": "django.shortcuts", "isExtraImport": true, "detail": "django.shortcuts", "documentation": {} }, { "label": "render", "importPath": "django.shortcuts", "description": "django.shortcuts", "isExtraImport": true, "detail": "django.shortcuts", "documentation": {} }, { "label": "render", "importPath": "django.shortcuts", "description": "django.shortcuts", "isExtraImport": true, "detail": "django.shortcuts", "documentation": {} }, { "label": "parse_image", "importPath": "api.tracer", "description": "api.tracer", "isExtraImport": true, "detail": "api.tracer", "documentation": {} }, { "label": "read_image", "importPath": "api.tracer", "description": "api.tracer", "isExtraImport": true, "detail": "api.tracer", "documentation": {} }, { "label": "numpy_zip_str_to_arr", "importPath": "api.tracer", "description": "api.tracer", "isExtraImport": true, "detail": "api.tracer", "documentation": {} }, { "label": "os", "kind": 6, "isExtraImport": true, "importPath": "os", "description": "os", "detail": "os", "documentation": {} }, { "label": "get_asgi_application", "importPath": "django.core.asgi", "description": "django.core.asgi", "isExtraImport": true, "detail": "django.core.asgi", "documentation": {} }, { "label": "Path", "importPath": "pathlib", "description": "pathlib", "isExtraImport": true, "detail": "pathlib", "documentation": {} }, { "label": "load_dotenv", "importPath": "dotenv", "description": "dotenv", "isExtraImport": true, "detail": "dotenv", "documentation": {} }, { "label": "include", "importPath": "django.urls", "description": "django.urls", "isExtraImport": true, "detail": "django.urls", "documentation": {} }, { "label": "path", "importPath": "django.urls", "description": "django.urls", "isExtraImport": true, "detail": "django.urls", "documentation": {} }, { "label": "static", "importPath": "django.conf.urls.static", "description": "django.conf.urls.static", "isExtraImport": true, "detail": "django.conf.urls.static", "documentation": {} }, { "label": "csrf_exempt", "importPath": "django.views.decorators.csrf", "description": "django.views.decorators.csrf", "isExtraImport": true, "detail": "django.views.decorators.csrf", "documentation": {} }, { "label": "views", "importPath": "api", "description": "api", "isExtraImport": true, "detail": "api", "documentation": {} }, { "label": "views", "importPath": "frontImages", "description": "frontImages", "isExtraImport": true, "detail": "frontImages", "documentation": {} }, { "label": "get_wsgi_application", "importPath": "django.core.wsgi", "description": "django.core.wsgi", "isExtraImport": true, "detail": "django.core.wsgi", "documentation": {} }, { "label": "sys", "kind": 6, "isExtraImport": true, "importPath": "sys", "description": "sys", "detail": "sys", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0002_floorplan_d_border_floorplan_d_size_floorplan_paths", "description": "back.api.migrations.0002_floorplan_d_border_floorplan_d_size_floorplan_paths", "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0001_initial'),\n ]\n operations = [\n migrations.AddField(\n model_name='floorplan',\n name='d_border',\n field=models.IntegerField(default=1),\n preserve_default=False,", "detail": "back.api.migrations.0002_floorplan_d_border_floorplan_d_size_floorplan_paths", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0003_alter_floorplan_paths", "description": "back.api.migrations.0003_alter_floorplan_paths", "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0002_floorplan_d_border_floorplan_d_size_floorplan_paths'),\n ]\n operations = [\n migrations.AlterField(\n model_name='floorplan',\n name='paths',\n field=models.TextField(),\n ),", "detail": "back.api.migrations.0003_alter_floorplan_paths", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0004_alter_floorplan_d_border_alter_floorplan_d_size", "description": "back.api.migrations.0004_alter_floorplan_d_border_alter_floorplan_d_size", "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0003_alter_floorplan_paths'),\n ]\n operations = [\n migrations.AlterField(\n model_name='floorplan',\n name='d_border',\n field=models.IntegerField(blank=True, null=True),\n ),", "detail": "back.api.migrations.0004_alter_floorplan_d_border_alter_floorplan_d_size", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0005_floorplanpoints", "description": "back.api.migrations.0005_floorplanpoints", "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0004_alter_floorplan_d_border_alter_floorplan_d_size'),\n ]\n operations = [\n migrations.CreateModel(\n name='FloorplanPoints',\n fields=[\n ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n ('points', models.JSONField()),", "detail": "back.api.migrations.0005_floorplanpoints", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0006_remove_floorplanpoints_id_alter_floorplanpoints_plan", "description": "back.api.migrations.0006_remove_floorplanpoints_id_alter_floorplanpoints_plan", "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0005_floorplanpoints'),\n ]\n operations = [\n migrations.RemoveField(\n model_name='floorplanpoints',\n name='id',\n ),\n migrations.AlterField(", "detail": "back.api.migrations.0006_remove_floorplanpoints_id_alter_floorplanpoints_plan", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0007_alter_product_image1_alter_product_image2_and_more", "description": "back.api.migrations.0007_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.AlterField(\n model_name='product',\n name='image1',\n field=models.ImageField(blank=True, default=None, null=True, upload_to='files'),\n ),", "detail": "back.api.migrations.0007_alter_product_image1_alter_product_image2_and_more", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0008_element3d_image_clickablearea", "description": "back.api.migrations.0008_element3d_image_clickablearea", "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0007_alter_product_image1_alter_product_image2_and_more'),\n ]\n operations = [\n migrations.CreateModel(\n name='Element3D',\n fields=[\n ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n ('model_file', models.FileField(upload_to='models/')),", "detail": "back.api.migrations.0008_element3d_image_clickablearea", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.api.migrations.0009_remove_clickablearea_target_delete_image_and_more", "description": "back.api.migrations.0009_remove_clickablearea_target_delete_image_and_more", "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0008_element3d_image_clickablearea'),\n ]\n operations = [\n migrations.RemoveField(\n model_name='clickablearea',\n name='target',\n ),\n migrations.DeleteModel(", "detail": "back.api.migrations.0009_remove_clickablearea_target_delete_image_and_more", "documentation": {} }, { "label": "ApiConfig", "kind": 6, "importPath": "back.api.apps", "description": "back.api.apps", "peekOfCode": "class ApiConfig(AppConfig):\n default_auto_field = 'django.db.models.BigAutoField'\n name = 'api'", "detail": "back.api.apps", "documentation": {} }, { "label": "Product", "kind": 6, "importPath": "back.api.models", "description": "back.api.models", "peekOfCode": "class Product(models.Model):\n title = models.CharField(max_length=100)\n description = models.TextField(default=None, null=True)\n model3d = models.FileField(default=None, blank=True, null=True, upload_to=\"files\")\n image1 = models.ImageField(default=None, blank=True, null=True, upload_to=\"files\")\n image2 = models.ImageField(default=None, blank=True, null=True, upload_to=\"files\")\n image3 = models.ImageField(default=None, blank=True, null=True, upload_to=\"files\")\n def __str__(self):\n return self.title\nclass Floorplan(models.Model):", "detail": "back.api.models", "documentation": {} }, { "label": "Floorplan", "kind": 6, "importPath": "back.api.models", "description": "back.api.models", "peekOfCode": "class Floorplan(models.Model):\n title = models.CharField(max_length=200)\n np_field = models.TextField()\n d_size = models.IntegerField(null=True, blank=True)\n d_border = models.IntegerField(null=True, blank=True)\n paths = models.TextField()\nclass FloorplanPoints(models.Model):\n plan = models.OneToOneField(Floorplan, on_delete=models.CASCADE, primary_key=True)\n points = models.JSONField()", "detail": "back.api.models", "documentation": {} }, { "label": "FloorplanPoints", "kind": 6, "importPath": "back.api.models", "description": "back.api.models", "peekOfCode": "class FloorplanPoints(models.Model):\n plan = models.OneToOneField(Floorplan, on_delete=models.CASCADE, primary_key=True)\n points = models.JSONField()", "detail": "back.api.models", "documentation": {} }, { "label": "ProductSerializer", "kind": 6, "importPath": "back.api.serializers", "description": "back.api.serializers", "peekOfCode": "class ProductSerializer(serializers.HyperlinkedModelSerializer):\n class Meta:\n model = Product\n fields = [\n \"id\",\n \"title\",\n \"description\",\n \"model3d\",\n \"image1\",\n \"image2\",", "detail": "back.api.serializers", "documentation": {} }, { "label": "FloorplanSerializer", "kind": 6, "importPath": "back.api.serializers", "description": "back.api.serializers", "peekOfCode": "class FloorplanSerializer(serializers.ModelSerializer):\n class Meta:\n model = Floorplan\n fields = [\n \"id\",\n \"title\",\n \"np_field\",\n \"d_border\",\n \"d_size\",\n \"paths\",", "detail": "back.api.serializers", "documentation": {} }, { "label": "FloorplanListSerializer", "kind": 6, "importPath": "back.api.serializers", "description": "back.api.serializers", "peekOfCode": "class FloorplanListSerializer(serializers.ModelSerializer):\n class Meta:\n model = Floorplan\n fields = [\n \"id\",\n \"title\",\n ]\nclass FloorplanPointsSerializer(serializers.ModelSerializer):\n class Meta:\n model = FloorplanPoints", "detail": "back.api.serializers", "documentation": {} }, { "label": "FloorplanPointsSerializer", "kind": 6, "importPath": "back.api.serializers", "description": "back.api.serializers", "peekOfCode": "class FloorplanPointsSerializer(serializers.ModelSerializer):\n class Meta:\n model = FloorplanPoints\n fields = [\n \"points\",\n \"plan\",\n ]", "detail": "back.api.serializers", "documentation": {} }, { "label": "logger", "kind": 5, "importPath": "back.api.serializers", "description": "back.api.serializers", "peekOfCode": "logger = logging.getLogger(\"root\")\nclass ProductSerializer(serializers.HyperlinkedModelSerializer):\n class Meta:\n model = Product\n fields = [\n \"id\",\n \"title\",\n \"description\",\n \"model3d\",\n \"image1\",", "detail": "back.api.serializers", "documentation": {} }, { "label": "numpy_arr_to_zip_str", "kind": 2, "importPath": "back.api.tracer", "description": "back.api.tracer", "peekOfCode": "def numpy_arr_to_zip_str(arr):\n f = io.BytesIO()\n np.savez_compressed(f, arr=arr)\n return base64.b64encode(f.getvalue())\ndef numpy_zip_str_to_arr(zip_str):\n f = io.BytesIO(base64.b64decode(zip_str))\n return np.load(f)['arr'].tolist()\ndef read_image(content: bytes) -> np.ndarray:\n \"\"\"\n Image bytes to OpenCV image", "detail": "back.api.tracer", "documentation": {} }, { "label": "numpy_zip_str_to_arr", "kind": 2, "importPath": "back.api.tracer", "description": "back.api.tracer", "peekOfCode": "def numpy_zip_str_to_arr(zip_str):\n f = io.BytesIO(base64.b64decode(zip_str))\n return np.load(f)['arr'].tolist()\ndef read_image(content: bytes) -> np.ndarray:\n \"\"\"\n Image bytes to OpenCV image\n :param content: Image bytes\n :returns OpenCV image\n :raises TypeError: If content is not bytes\n :raises ValueError: If content does not represent an image", "detail": "back.api.tracer", "documentation": {} }, { "label": "read_image", "kind": 2, "importPath": "back.api.tracer", "description": "back.api.tracer", "peekOfCode": "def read_image(content: bytes) -> np.ndarray:\n \"\"\"\n Image bytes to OpenCV image\n :param content: Image bytes\n :returns OpenCV image\n :raises TypeError: If content is not bytes\n :raises ValueError: If content does not represent an image\n \"\"\"\n if not isinstance(content, bytes):\n raise TypeError(f\"Expected 'content' to be bytes, received: {type(content)}\")", "detail": "back.api.tracer", "documentation": {} }, { "label": "parse_image", "kind": 2, "importPath": "back.api.tracer", "description": "back.api.tracer", "peekOfCode": "def parse_image(img):\n (img_h, img_w) = img.shape[:2]\n t = 1920\n w = t\n h = int((img_h / img_w) * t)\n img = cv2.resize(img, (w, h))\n gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n gray = 255 - gray\n gray = cv2.threshold(gray, 250, 255, cv2.THRESH_BINARY)[1]\n gray = cv2.blur(gray, (10, 5))", "detail": "back.api.tracer", "documentation": {} }, { "label": "Products", "kind": 6, "importPath": "back.api.views", "description": "back.api.views", "peekOfCode": "class Products(APIView):\n def get(self, request):\n tasks = Product.objects.all()\n serializer = ProductSerializer(tasks, many=True)\n return JsonResponse(serializer.data, safe=False)\n def post(self, request):\n data = JSONParser().parse(request)\n serializer = ProductSerializer(data=data)\n if serializer.is_valid():\n serializer.save()", "detail": "back.api.views", "documentation": {} }, { "label": "FloorplanView", "kind": 6, "importPath": "back.api.views", "description": "back.api.views", "peekOfCode": "class FloorplanView(APIView):\n parser_classes = (\n MultiPartParser,\n JSONParser,\n )\n def post(self, request):\n try:\n file = request.FILES[\"demo\"]\n logger.info(file.__dict__)\n res = parse_image(read_image(file.read()))", "detail": "back.api.views", "documentation": {} }, { "label": "FloorplanPointsView", "kind": 6, "importPath": "back.api.views", "description": "back.api.views", "peekOfCode": "class FloorplanPointsView(APIView):\n def get(self, request, id):\n if FloorplanPoints.objects.filter(plan=id).exists():\n points = FloorplanPoints.objects.get(plan=id)\n serializer = FloorplanPointsSerializer(points, many=False)\n return JsonResponse(serializer.data, safe=False)\n else:\n return JsonResponse(\n \"No item\", safe=False, status=status.HTTP_400_BAD_REQUEST\n )", "detail": "back.api.views", "documentation": {} }, { "label": "logger", "kind": 5, "importPath": "back.api.views", "description": "back.api.views", "peekOfCode": "logger = logging.getLogger(\"root\")\nclass Products(APIView):\n def get(self, request):\n tasks = Product.objects.all()\n serializer = ProductSerializer(tasks, many=True)\n return JsonResponse(serializer.data, safe=False)\n def post(self, request):\n data = JSONParser().parse(request)\n serializer = ProductSerializer(data=data)\n if serializer.is_valid():", "detail": "back.api.views", "documentation": {} }, { "label": "application", "kind": 5, "importPath": "back.back.asgi", "description": "back.back.asgi", "peekOfCode": "application = get_asgi_application()", "detail": "back.back.asgi", "documentation": {} }, { "label": "BASE_DIR", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "BASE_DIR = Path(__file__).resolve().parent.parent\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = \"django-insecure-ly8rk@zb&ne*-063&q-=81!d@8q0hh4$&q!_7mtqc81(rlejqd\"\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = [\n \"localhost\",\n \"localhost:8000\",", "detail": "back.back.settings", "documentation": {} }, { "label": "SECRET_KEY", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "SECRET_KEY = \"django-insecure-ly8rk@zb&ne*-063&q-=81!d@8q0hh4$&q!_7mtqc81(rlejqd\"\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = [\n \"localhost\",\n \"localhost:8000\",\n \"127.0.0.1\",\n \"127.0.0.1:8000\",\n \"192.168.103.159\",\n \"192.168.103.159:8000\",", "detail": "back.back.settings", "documentation": {} }, { "label": "DEBUG", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "DEBUG = True\nALLOWED_HOSTS = [\n \"localhost\",\n \"localhost:8000\",\n \"127.0.0.1\",\n \"127.0.0.1:8000\",\n \"192.168.103.159\",\n \"192.168.103.159:8000\",\n \"back\",\n \"back:8000\",", "detail": "back.back.settings", "documentation": {} }, { "label": "ALLOWED_HOSTS", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "ALLOWED_HOSTS = [\n \"localhost\",\n \"localhost:8000\",\n \"127.0.0.1\",\n \"127.0.0.1:8000\",\n \"192.168.103.159\",\n \"192.168.103.159:8000\",\n \"back\",\n \"back:8000\",\n \"demo.kustarshina.ru\",", "detail": "back.back.settings", "documentation": {} }, { "label": "CSRF_TRUSTED_ORIGINS", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "CSRF_TRUSTED_ORIGINS = (\n \"https://demo.kustarshina.ru\",\n \"http://localhost\",\n \"http://localhost:3011\",\n \"http://localhost:4173\",\n \"http://localhost:5173\",\n \"http://192.168.103.159:3011\",\n \"http://192.168.103.159\",\n)\nCORS_ORIGIN_ALLOW_ALL = False", "detail": "back.back.settings", "documentation": {} }, { "label": "CORS_ORIGIN_ALLOW_ALL", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "CORS_ORIGIN_ALLOW_ALL = False\nCORS_ORIGIN_WHITELIST = [\n \"null\",\n \"http://localhost\",\n \"http://localhost:3011\",\n \"http://localhost:4173\",\n \"http://localhost:5173\",\n \"http://localhost:8000\",\n \"http://192.168.103.159:3011\",\n \"http://127.0.0.1\",", "detail": "back.back.settings", "documentation": {} }, { "label": "CORS_ORIGIN_WHITELIST", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "CORS_ORIGIN_WHITELIST = [\n \"null\",\n \"http://localhost\",\n \"http://localhost:3011\",\n \"http://localhost:4173\",\n \"http://localhost:5173\",\n \"http://localhost:8000\",\n \"http://192.168.103.159:3011\",\n \"http://127.0.0.1\",\n \"http://192.168.103.159\",", "detail": "back.back.settings", "documentation": {} }, { "label": "INSTALLED_APPS", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "INSTALLED_APPS = [\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"django.contrib.sessions\",\n \"django.contrib.messages\",\n \"django.contrib.staticfiles\",\n \"corsheaders\",\n \"api\",\n \"rest_framework\",", "detail": "back.back.settings", "documentation": {} }, { "label": "MIDDLEWARE", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "MIDDLEWARE = [\n \"django.middleware.security.SecurityMiddleware\",\n \"django.contrib.sessions.middleware.SessionMiddleware\",\n \"django.middleware.common.CommonMiddleware\",\n \"corsheaders.middleware.CorsMiddleware\",\n \"django.middleware.csrf.CsrfViewMiddleware\",\n \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n \"django.contrib.messages.middleware.MessageMiddleware\",\n \"django.middleware.clickjacking.XFrameOptionsMiddleware\",\n]", "detail": "back.back.settings", "documentation": {} }, { "label": "ROOT_URLCONF", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "ROOT_URLCONF = \"back.urls\"\nTEMPLATES = [\n {\n \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n \"DIRS\": [],\n \"APP_DIRS\": True,\n \"OPTIONS\": {\n \"context_processors\": [\n \"django.template.context_processors.debug\",\n \"django.template.context_processors.request\",", "detail": "back.back.settings", "documentation": {} }, { "label": "TEMPLATES", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "TEMPLATES = [\n {\n \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n \"DIRS\": [],\n \"APP_DIRS\": True,\n \"OPTIONS\": {\n \"context_processors\": [\n \"django.template.context_processors.debug\",\n \"django.template.context_processors.request\",\n \"django.contrib.auth.context_processors.auth\",", "detail": "back.back.settings", "documentation": {} }, { "label": "WSGI_APPLICATION", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "WSGI_APPLICATION = \"back.wsgi.application\"\n# Database\n# https://docs.djangoproject.com/en/5.0/ref/settings/#databases\nDATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.postgresql_psycopg2\", # change engine to this\n \"NAME\": \"interactive_table\", # db name you created above\n \"HOST\": os.getenv(\"DB_HOST\"), # usually localhost\n \"USER\": os.getenv(\"DB_USER\"), # db user you created above or postgres default\n \"PASSWORD\": os.getenv(", "detail": "back.back.settings", "documentation": {} }, { "label": "DATABASES", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "DATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.postgresql_psycopg2\", # change engine to this\n \"NAME\": \"interactive_table\", # db name you created above\n \"HOST\": os.getenv(\"DB_HOST\"), # usually localhost\n \"USER\": os.getenv(\"DB_USER\"), # db user you created above or postgres default\n \"PASSWORD\": os.getenv(\n \"DB_PASSWORD\"\n ), # db password you created above or postgres\n \"PORT\": os.getenv(\"DB_PORT\"), # usually 5432", "detail": "back.back.settings", "documentation": {} }, { "label": "AUTH_PASSWORD_VALIDATORS", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "AUTH_PASSWORD_VALIDATORS = [\n {\n \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\",\n },\n {\n \"NAME\": \"django.contrib.auth.password_validation.MinimumLengthValidator\",\n },\n {\n \"NAME\": \"django.contrib.auth.password_validation.CommonPasswordValidator\",\n },", "detail": "back.back.settings", "documentation": {} }, { "label": "LANGUAGE_CODE", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "LANGUAGE_CODE = \"en-us\"\nTIME_ZONE = \"UTC\"\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"", "detail": "back.back.settings", "documentation": {} }, { "label": "TIME_ZONE", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "TIME_ZONE = \"UTC\"\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"\nLOGGING = {", "detail": "back.back.settings", "documentation": {} }, { "label": "USE_I18N", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "USE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"\nLOGGING = {\n \"version\": 1,", "detail": "back.back.settings", "documentation": {} }, { "label": "USE_TZ", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "USE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/5.0/howto/static-files/\nSTATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"\nLOGGING = {\n \"version\": 1,\n \"disable_existing_loggers\": False,", "detail": "back.back.settings", "documentation": {} }, { "label": "STATIC_URL", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "STATIC_URL = \"static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"\nLOGGING = {\n \"version\": 1,\n \"disable_existing_loggers\": False,\n \"formatters\": {\n \"verbose\": {\n \"format\": \"{levelname} {asctime} {module} {process:d} {thread:d} {message}\",", "detail": "back.back.settings", "documentation": {} }, { "label": "DEFAULT_AUTO_FIELD", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "DEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"\nLOGGING = {\n \"version\": 1,\n \"disable_existing_loggers\": False,\n \"formatters\": {\n \"verbose\": {\n \"format\": \"{levelname} {asctime} {module} {process:d} {thread:d} {message}\",\n \"style\": \"{\",\n },\n \"large\": {", "detail": "back.back.settings", "documentation": {} }, { "label": "LOGGING", "kind": 5, "importPath": "back.back.settings", "description": "back.back.settings", "peekOfCode": "LOGGING = {\n \"version\": 1,\n \"disable_existing_loggers\": False,\n \"formatters\": {\n \"verbose\": {\n \"format\": \"{levelname} {asctime} {module} {process:d} {thread:d} {message}\",\n \"style\": \"{\",\n },\n \"large\": {\n \"format\": \"%(asctime)s %(levelname)s %(process)d %(filename)s:%(lineno)d \"", "detail": "back.back.settings", "documentation": {} }, { "label": "router", "kind": 5, "importPath": "back.back.urls", "description": "back.back.urls", "peekOfCode": "router = routers.DefaultRouter()\nrouter.register(r'api/front_img', frontimg_views.ImageViewSet)\nurlpatterns = [\n path('', include(router.urls)),\n path(\"admin/\", admin.site.urls),\n path(\"api/products\", csrf_exempt(views.Products.as_view())),\n path(\"api/floorplan/\", csrf_exempt(views.FloorplanView.as_view())),\n path(\"api/floorplan/\", csrf_exempt(views.FloorplanView.as_view())),\n path(\"api/floorplan//points\", csrf_exempt(views.FloorplanPointsView.as_view())),\n] + static('/files', document_root='files')", "detail": "back.back.urls", "documentation": {} }, { "label": "urlpatterns", "kind": 5, "importPath": "back.back.urls", "description": "back.back.urls", "peekOfCode": "urlpatterns = [\n path('', include(router.urls)),\n path(\"admin/\", admin.site.urls),\n path(\"api/products\", csrf_exempt(views.Products.as_view())),\n path(\"api/floorplan/\", csrf_exempt(views.FloorplanView.as_view())),\n path(\"api/floorplan/\", csrf_exempt(views.FloorplanView.as_view())),\n path(\"api/floorplan//points\", csrf_exempt(views.FloorplanPointsView.as_view())),\n] + static('/files', document_root='files')", "detail": "back.back.urls", "documentation": {} }, { "label": "application", "kind": 5, "importPath": "back.back.wsgi", "description": "back.back.wsgi", "peekOfCode": "application = get_wsgi_application()", "detail": "back.back.wsgi", "documentation": {} }, { "label": "Migration", "kind": 6, "importPath": "back.frontImages.migrations.0001_initial", "description": "back.frontImages.migrations.0001_initial", "peekOfCode": "class Migration(migrations.Migration):\n initial = True\n dependencies = [\n ]\n operations = [\n migrations.CreateModel(\n name='Element3D',\n fields=[\n ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n ('model_file', models.FileField(upload_to='models/')),", "detail": "back.frontImages.migrations.0001_initial", "documentation": {} }, { "label": "FrontimagesConfig", "kind": 6, "importPath": "back.frontImages.apps", "description": "back.frontImages.apps", "peekOfCode": "class FrontimagesConfig(AppConfig):\n default_auto_field = 'django.db.models.BigAutoField'\n name = 'frontImages'", "detail": "back.frontImages.apps", "documentation": {} }, { "label": "Image", "kind": 6, "importPath": "back.frontImages.models", "description": "back.frontImages.models", "peekOfCode": "class Image(models.Model):\n file = models.ImageField(upload_to=group_based_upload_to)\n alt = models.CharField(max_length=255)\n title = models.CharField(max_length=255)\n def __str__(self):\n return self.title", "detail": "back.frontImages.models", "documentation": {} }, { "label": "group_based_upload_to", "kind": 2, "importPath": "back.frontImages.models", "description": "back.frontImages.models", "peekOfCode": "def group_based_upload_to(instance, filename):\n logger.info(instance)\n return \"files/image/{}/{}/{}\".format(\n type(instance).__name__.lower(), instance.id, filename\n )\nclass Image(models.Model):\n file = models.ImageField(upload_to=group_based_upload_to)\n alt = models.CharField(max_length=255)\n title = models.CharField(max_length=255)\n def __str__(self):", "detail": "back.frontImages.models", "documentation": {} }, { "label": "logger", "kind": 5, "importPath": "back.frontImages.models", "description": "back.frontImages.models", "peekOfCode": "logger = logging.getLogger(\"root\")\ndef group_based_upload_to(instance, filename):\n logger.info(instance)\n return \"files/image/{}/{}/{}\".format(\n type(instance).__name__.lower(), instance.id, filename\n )\nclass Image(models.Model):\n file = models.ImageField(upload_to=group_based_upload_to)\n alt = models.CharField(max_length=255)\n title = models.CharField(max_length=255)", "detail": "back.frontImages.models", "documentation": {} }, { "label": "ImageSerializer", "kind": 6, "importPath": "back.frontImages.serializers", "description": "back.frontImages.serializers", "peekOfCode": "class ImageSerializer(serializers.ModelSerializer):\n class Meta:\n model = Image\n fields = \"__all__\"", "detail": "back.frontImages.serializers", "documentation": {} }, { "label": "ImageViewSet", "kind": 6, "importPath": "back.frontImages.views", "description": "back.frontImages.views", "peekOfCode": "class ImageViewSet(viewsets.ModelViewSet):\n queryset = Image.objects.all()\n serializer_class = ImageSerializer", "detail": "back.frontImages.views", "documentation": {} }, { "label": "ObjectConfig", "kind": 6, "importPath": "back.object.apps", "description": "back.object.apps", "peekOfCode": "class ObjectConfig(AppConfig):\n default_auto_field = 'django.db.models.BigAutoField'\n name = 'object'", "detail": "back.object.apps", "documentation": {} }, { "label": "Element3D", "kind": 6, "importPath": "back.object.models", "description": "back.object.models", "peekOfCode": "class Element3D(models.Model):\n model_file = models.FileField(upload_to=group_based_upload_to)\n name = models.CharField(max_length=255)\n description = models.TextField()\n def __str__(self):\n return self.name\nclass ClickableArea(models.Model):\n name = models.CharField(max_length=255)\n description = models.TextField()\n object_name = models.CharField(max_length=255)", "detail": "back.object.models", "documentation": {} }, { "label": "ClickableArea", "kind": 6, "importPath": "back.object.models", "description": "back.object.models", "peekOfCode": "class ClickableArea(models.Model):\n name = models.CharField(max_length=255)\n description = models.TextField()\n object_name = models.CharField(max_length=255)\n target = models.ForeignKey(Element3D, on_delete=models.CASCADE, related_name='clickable_areas')\n def __str__(self):\n return self.name", "detail": "back.object.models", "documentation": {} }, { "label": "group_based_upload_to", "kind": 2, "importPath": "back.object.models", "description": "back.object.models", "peekOfCode": "def group_based_upload_to(instance, filename):\n logger.info(instance)\n return \"files/image/{}/{}/{}\".format(\n type(instance).__name__.lower(), instance.id, filename\n )\nclass Element3D(models.Model):\n model_file = models.FileField(upload_to=group_based_upload_to)\n name = models.CharField(max_length=255)\n description = models.TextField()\n def __str__(self):", "detail": "back.object.models", "documentation": {} }, { "label": "logger", "kind": 5, "importPath": "back.object.models", "description": "back.object.models", "peekOfCode": "logger = logging.getLogger(\"root\")\ndef group_based_upload_to(instance, filename):\n logger.info(instance)\n return \"files/image/{}/{}/{}\".format(\n type(instance).__name__.lower(), instance.id, filename\n )\nclass Element3D(models.Model):\n model_file = models.FileField(upload_to=group_based_upload_to)\n name = models.CharField(max_length=255)\n description = models.TextField()", "detail": "back.object.models", "documentation": {} }, { "label": "main", "kind": 2, "importPath": "back.manage", "description": "back.manage", "peekOfCode": "def main():\n \"\"\"Run administrative tasks.\"\"\"\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'back.settings')\n try:\n from django.core.management import execute_from_command_line\n except ImportError as exc:\n raise ImportError(\n \"Couldn't import Django. Are you sure it's installed and \"\n \"available on your PYTHONPATH environment variable? Did you \"\n \"forget to activate a virtual environment?\"", "detail": "back.manage", "documentation": {} } ]