2023-11-20 15:53:42 +01:00
|
|
|
from django.db import models
|
2023-11-28 18:32:10 +01:00
|
|
|
from django.core.validators import FileExtensionValidator
|
2023-11-20 15:53:42 +01:00
|
|
|
|
|
|
|
# Create your models here.
|
|
|
|
|
2023-11-28 18:32:10 +01:00
|
|
|
|
2023-11-20 15:53:42 +01:00
|
|
|
class DetectImage(models.Model):
|
2023-11-28 18:32:10 +01:00
|
|
|
image = models.ImageField(
|
|
|
|
upload_to="plankton/%Y/%m/%d/",
|
|
|
|
validators=[FileExtensionValidator(allowed_extensions=["jpg", "png"])],
|
|
|
|
)
|