mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
feat: make the content field optional
This commit is contained in:
parent
b5f6c06b8b
commit
7ec4f906af
@ -158,13 +158,22 @@ class Document(models.Model):
|
|||||||
|
|
||||||
correspondent = models.ForeignKey(
|
correspondent = models.ForeignKey(
|
||||||
Correspondent, blank=True, null=True, related_name="documents")
|
Correspondent, blank=True, null=True, related_name="documents")
|
||||||
|
|
||||||
title = models.CharField(max_length=128, blank=True, db_index=True)
|
title = models.CharField(max_length=128, blank=True, db_index=True)
|
||||||
content = models.TextField(db_index=True)
|
|
||||||
|
content = models.TextField(
|
||||||
|
db_index=True,
|
||||||
|
blank=True,
|
||||||
|
help_text="The raw, text-only data of the document. This field is "
|
||||||
|
"primarily used for searching."
|
||||||
|
)
|
||||||
|
|
||||||
file_type = models.CharField(
|
file_type = models.CharField(
|
||||||
max_length=4,
|
max_length=4,
|
||||||
editable=False,
|
editable=False,
|
||||||
choices=tuple([(t, t.upper()) for t in TYPES])
|
choices=tuple([(t, t.upper()) for t in TYPES])
|
||||||
)
|
)
|
||||||
|
|
||||||
tags = models.ManyToManyField(
|
tags = models.ManyToManyField(
|
||||||
Tag, related_name="documents", blank=True)
|
Tag, related_name="documents", blank=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user