fix: upload 3D module

This commit is contained in:
xiaoma
2026-02-02 20:40:32 +08:00
parent b8024da3dc
commit 69c8a88571
4 changed files with 80 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ class ESP32Config(models.Model):
description = models.TextField(verbose_name="描述", blank=True)
detail_image = models.ImageField(upload_to='products/details/', blank=True, null=True, verbose_name="详情页长图 (上传)")
detail_image_url = models.URLField(blank=True, null=True, verbose_name="详情页长图 (URL)", help_text="如果填写了URL将优先使用URL")
static_image_url = models.URLField(blank=True, null=True, verbose_name="产品静态图 (URL)")
model_3d_url = models.URLField(blank=True, null=True, verbose_name="产品3D模型 (URL)", help_text="请上传包含 .obj 模型文件和 .mtl 材质文件的 .zip 压缩包")
def __str__(self):
return f"{self.name} - ¥{self.price}"