expephalon-kumisms/core/models/files.py
2020-04-13 12:08:59 +02:00

13 lines
No EOL
398 B
Python

from django.db.models import Model, CharField, ImageField, FileField
from core.helpers.files import generate_storage_filename
# Create your models here.
class ImageFile(Model):
filename = CharField(max_length=255)
file = ImageField(upload_to=generate_storage_filename)
class File(Model):
filename = CharField(max_length=255)
file = FileField(upload_to=generate_storage_filename)