mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Add FileInfo
class with pass
implementations
This commit is contained in:
parent
6ca389c28a
commit
0b34894db9
@ -12,6 +12,35 @@ from django.utils import timezone
|
|||||||
from .managers import LogManager
|
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):
|
class SluggedModel(models.Model):
|
||||||
|
|
||||||
name = models.CharField(max_length=128, unique=True)
|
name = models.CharField(max_length=128, unique=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user