new migrations; new models in apps.dash for Applets and UserApplets; new ITs to match
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user