2018-05-01 02:23:36 +00:00
|
|
|
from django.contrib.auth.models import User
|
2018-04-19 19:52:40 +00:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
from apps.map.models import CaseStudy, CaseStudyDraft
|
|
|
|
|
|
|
|
|
|
|
|
class BaseFile(models.Model):
|
|
|
|
file = models.FileField(
|
|
|
|
upload_to='.',
|
|
|
|
)
|
2018-05-01 02:23:36 +00:00
|
|
|
user = models.ForeignKey(
|
|
|
|
User, related_name='files'
|
|
|
|
)
|
2018-04-19 19:52:40 +00:00
|
|
|
|
|
|
|
class Meta:
|
|
|
|
abstract = True
|
|
|
|
|
2018-04-23 05:15:33 +00:00
|
|
|
def __str__(self):
|
|
|
|
return self.file.name
|
|
|
|
|
2018-04-19 19:52:40 +00:00
|
|
|
|
|
|
|
class File(BaseFile):
|
|
|
|
pass
|