Plankton_Detector/PlanktonDetector/DetectionApp/models.py

12 lines
307 B
Python
Raw Normal View History

from django.db import models
from django.core.validators import FileExtensionValidator
# Create your models here.
class DetectImage(models.Model):
image = models.ImageField(
upload_to="plankton/%Y/%m/%d/",
validators=[FileExtensionValidator(allowed_extensions=["jpg", "png"])],
)