Browse Source

Specify storage to example model

pull/1779/head
Hironsan 2 years ago
parent
commit
3aad428164
1 changed files with 2 additions and 1 deletions
  1. 3
      backend/examples/models.py

3
backend/examples/models.py

@ -2,6 +2,7 @@ import uuid
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.db import models from django.db import models
from django_drf_filepond.models import DrfFilePondStoredStorage
from .managers import ExampleManager, ExampleStateManager from .managers import ExampleManager, ExampleStateManager
from projects.models import Project from projects.models import Project
@ -12,7 +13,7 @@ class Example(models.Model):
uuid = models.UUIDField(default=uuid.uuid4, editable=False, db_index=True, unique=True) uuid = models.UUIDField(default=uuid.uuid4, editable=False, db_index=True, unique=True)
meta = models.JSONField(default=dict) meta = models.JSONField(default=dict)
filename = models.FileField(default=".", max_length=1024)
filename = models.FileField(default=".", max_length=1024, storage=DrfFilePondStoredStorage())
project = models.ForeignKey(to=Project, on_delete=models.CASCADE, related_name="examples") project = models.ForeignKey(to=Project, on_delete=models.CASCADE, related_name="examples")
annotations_approved_by = models.ForeignKey(to=User, on_delete=models.SET_NULL, null=True, blank=True) annotations_approved_by = models.ForeignKey(to=User, on_delete=models.SET_NULL, null=True, blank=True)
text = models.TextField(null=True, blank=True) text = models.TextField(null=True, blank=True)

Loading…
Cancel
Save