mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-14 00:26:21 +00:00
Feature: page count (#7750)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -205,6 +205,18 @@ class Document(SoftDeleteModel, ModelWithOwner):
|
||||
help_text=_("The checksum of the archived document."),
|
||||
)
|
||||
|
||||
page_count = models.PositiveIntegerField(
|
||||
_("page count"),
|
||||
blank=False,
|
||||
null=True,
|
||||
unique=False,
|
||||
db_index=False,
|
||||
validators=[MinValueValidator(1)],
|
||||
help_text=_(
|
||||
"The number of pages of the document.",
|
||||
),
|
||||
)
|
||||
|
||||
created = models.DateTimeField(_("created"), default=timezone.now, db_index=True)
|
||||
|
||||
modified = models.DateTimeField(
|
||||
@@ -414,6 +426,7 @@ class SavedView(ModelWithOwner):
|
||||
OWNER = ("owner", _("Owner"))
|
||||
SHARED = ("shared", _("Shared"))
|
||||
ASN = ("asn", _("ASN"))
|
||||
PAGE_COUNT = ("pagecount", _("Pages"))
|
||||
CUSTOM_FIELD = ("custom_field_%d", ("Custom Field"))
|
||||
|
||||
name = models.CharField(_("name"), max_length=128)
|
||||
|
Reference in New Issue
Block a user