13 lines
398 B
Python
13 lines
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)
|