new migrations; new models in apps.dash for Applets and UserApplets; new ITs to match

This commit is contained in:
Disco DeDisco
2026-03-04 15:43:24 -05:00
parent 9548a2cd15
commit ca835059c2
5 changed files with 103 additions and 2 deletions

View File

@@ -38,3 +38,26 @@ class Item(models.Model):
def __str__(self):
return self.text
class Applet(models.Model):
slug = models.SlugField(unique=True)
name = models.CharField(max_length=100)
default_visible = models.BooleanField(default=True)
def __str__(self):
return self.name
class UserApplet(models.Model):
user = models.ForeignKey(
"lyric.User",
related_name="user_applets",
on_delete=models.CASCADE,
)
applet = models.ForeignKey(
Applet,
on_delete=models.CASCADE,
)
visible = models.BooleanField(default=True)
class Meta:
unique_together = ("user", "applet")