expephalon-playsms/core/models/files.py

13 lines
398 B
Python
Raw Normal View History

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)