feat: make the content field optional

This commit is contained in:
Daniel Quinn 2017-03-11 16:37:30 +00:00
parent b5f6c06b8b
commit 7ec4f906af

View File

@ -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)