Add FileInfo class with pass implementations

This commit is contained in:
Tikitu de Jager 2016-03-07 20:42:25 +02:00
parent 6ca389c28a
commit 0b34894db9

View File

@ -12,6 +12,35 @@ from django.utils import timezone
from .managers import LogManager
class FileInfo(object):
def __init__(self, title, suffix,
correspondent=None, tags=None,
file_mtime=None, path=None):
self._title = title
self._suffix = suffix
self._correspondent = correspondent
self._tags = tags
self._file_mtime = file_mtime
self._path = path
@classmethod
def from_path(cls, path):
pass
@classmethod
def from_document(cls, document):
pass
def filename(self):
pass
def kwargs_for_document_create(self):
pass
def add_tags(self, tags):
self._tags = set(tags).union(self._tags)
class SluggedModel(models.Model):
name = models.CharField(max_length=128, unique=True)