From 9cc01d06433601bad030feb4041f777153926ba8 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Mon, 1 Jul 2024 09:43:37 +0300 Subject: [PATCH] new files --- .vscode/PythonImportHelper-v2-Completion.json | 25 +++++++++++++++++++ back/object/models.py | 7 +++--- front/src/stores/promo_scene.ts | 12 +++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 front/src/stores/promo_scene.ts diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json index 11fd02a..5e11184 100644 --- a/.vscode/PythonImportHelper-v2-Completion.json +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -120,6 +120,22 @@ "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", @@ -1077,6 +1093,15 @@ "detail": "back.object.migrations.0004_alter_clickablearea_target_name", "documentation": {} }, + { + "label": "Migration", + "kind": 6, + "importPath": "back.object.migrations.0005_scene3d_hdr_gainmap_scene3d_hdr_json_and_more", + "description": "back.object.migrations.0005_scene3d_hdr_gainmap_scene3d_hdr_json_and_more", + "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('object', '0004_alter_clickablearea_target_name'),\n ]\n operations = [\n migrations.AddField(\n model_name='scene3d',\n name='hdr_gainmap',\n field=models.FileField(blank=True, null=True, upload_to=''),\n ),", + "detail": "back.object.migrations.0005_scene3d_hdr_gainmap_scene3d_hdr_json_and_more", + "documentation": {} + }, { "label": "Scene3DAdmin", "kind": 6, diff --git a/back/object/models.py b/back/object/models.py index eb2a24d..836febb 100644 --- a/back/object/models.py +++ b/back/object/models.py @@ -35,9 +35,10 @@ class Scene3D(models.Model): max_distance = models.IntegerField( validators=[MinValueValidator(2), MaxValueValidator(1000)], blank=True, null=True ) - gainmap = models.FileField() - json = models.FileField() - webp = models.FileField() + + hdr_gainmap = models.FileField(blank=True, null=True) + hdr_json = models.FileField(blank=True, null=True) + hdr_webp = models.FileField(blank=True, null=True) def __str__(self): diff --git a/front/src/stores/promo_scene.ts b/front/src/stores/promo_scene.ts new file mode 100644 index 0000000..d6c5777 --- /dev/null +++ b/front/src/stores/promo_scene.ts @@ -0,0 +1,12 @@ +import { defineStore } from 'pinia' + +export const usePromoScene = defineStore('promo_scene', { + state: () => { + return [] as PromoScene[] + }, + actions: { + setData(data: PromoScene[]) { + this.$state = data + } + } +})