new applets app for cross-board usage of Applet() & UserApplet() models; dashboard migrations reset and apps reseeded w. new default specs; core.settings & many tests thru-out suite updated accordingly
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -36,30 +36,4 @@ class Item(models.Model):
|
||||
unique_together = ("list", "text")
|
||||
|
||||
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)
|
||||
grid_cols = models.PositiveSmallIntegerField(default=12)
|
||||
grid_rows = models.PositiveSmallIntegerField(default=3)
|
||||
|
||||
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")
|
||||
|
||||
return self.text
|
||||
|
||||
Reference in New Issue
Block a user