seed script

This commit is contained in:
javad committed 2026-09-10 16:39:02 +03:30
1 parent fa9d154db9
commit 08c30aa47f
15 files changed
+496 -17

No files matched your search

+16
View File
@@ -125,3 +125,19 @@ class PageTitle(models.Model):
def __str__(self):
return f"{self.route_name}: {self.title}"
class ProductionSeedState(models.Model):
"""Audit marker that makes production seed imports idempotent."""
bundle_sha256 = models.CharField(max_length=64, unique=True)
manifest = models.JSONField(default=dict)
applied_at = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ("-applied_at",)
verbose_name = "وضعیت بذر Production"
verbose_name_plural = "وضعیت بذرهای Production"
def __str__(self):
return f"{self.bundle_sha256[:12]} @ {self.applied_at}"