mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 08:19:15 +02:00
Plugins infrastructure
This commit is contained in:
parent
9964adfbf6
commit
d4028450a9
32 changed files with 1560 additions and 47 deletions
|
@ -363,3 +363,24 @@ def remove_attached_content(sender, instance, **kwargs):
|
|||
getattr(instance, field).delete()
|
||||
except Content.DoesNotExist:
|
||||
pass
|
||||
|
||||
|
||||
class PluginConfiguration(models.Model):
|
||||
"""
|
||||
Store plugin configuration in DB
|
||||
"""
|
||||
|
||||
code = models.CharField(max_length=100)
|
||||
user = models.ForeignKey(
|
||||
"users.User",
|
||||
related_name="plugins",
|
||||
on_delete=models.CASCADE,
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
conf = JSONField(null=True, blank=True)
|
||||
enabled = models.BooleanField(default=False)
|
||||
creation_date = models.DateTimeField(default=timezone.now)
|
||||
|
||||
class Meta:
|
||||
unique_together = ("user", "code")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue