Add support for generic documents (admin only) (#44)

* Add support for generic documents
* Add publish / unpublish actions
* Minor improvements to models properties
This commit is contained in:
2025-01-17 22:44:50 +01:00
committed by GitHub
parent db79a02c85
commit c467fb24ca
10 changed files with 94 additions and 11 deletions

View File

@@ -236,6 +236,13 @@ class Tag(models.Model):
)
class GenericDocument(Document):
tags = models.ManyToManyField(Tag, blank=True)
class Meta:
verbose_name_plural = "Generic Documents"
@receiver(models.signals.pre_save, sender=Manufacturer)
@receiver(models.signals.pre_save, sender=Company)
@receiver(models.signals.pre_save, sender=Scale)