Consistent naming to Share Link Bundle

This commit is contained in:
shamoon
2025-11-05 17:24:23 -08:00
parent 0ffde9e71b
commit 30ccf42c85
24 changed files with 294 additions and 271 deletions

View File

@@ -756,7 +756,7 @@ class ShareLink(SoftDeleteModel):
return f"Share Link for {self.document.title}"
class ShareBundle(SoftDeleteModel):
class ShareLinkBundle(SoftDeleteModel):
class Status(models.TextChoices):
PENDING = ("pending", _("Pending"))
PROCESSING = ("processing", _("Processing"))
@@ -765,8 +765,8 @@ class ShareBundle(SoftDeleteModel):
class Meta:
ordering = ("-created",)
verbose_name = _("share bundle")
verbose_name_plural = _("share bundles")
verbose_name = _("share link bundle")
verbose_name_plural = _("share link bundles")
created = models.DateTimeField(
_("created"),
@@ -795,7 +795,7 @@ class ShareBundle(SoftDeleteModel):
User,
blank=True,
null=True,
related_name="share_bundles",
related_name="share_link_bundles",
on_delete=models.SET_NULL,
verbose_name=_("owner"),
)
@@ -837,12 +837,12 @@ class ShareBundle(SoftDeleteModel):
documents = models.ManyToManyField(
"documents.Document",
related_name="share_bundles",
related_name="share_link_bundles",
verbose_name=_("documents"),
)
def __str__(self):
return _("Share bundle %(slug)s") % {"slug": self.slug}
return _("Share link bundle %(slug)s") % {"slug": self.slug}
@property
def absolute_file_path(self) -> Path | None: