kopia lustrzana https://github.com/OpenDroneMap/WebODM
16 wiersze
470 B
Python
16 wiersze
470 B
Python
from django.db import models
|
|
|
|
class Plugin(models.Model):
|
|
name = models.CharField(max_length=255, primary_key=True, blank=False, null=False, help_text="Plugin name")
|
|
enabled = models.BooleanField(db_index=True, default=True, help_text="Whether this plugin is enabled.")
|
|
|
|
def __str__(self):
|
|
return self.name
|
|
|
|
def enable(self):
|
|
self.enabled = True
|
|
self.save()
|
|
|
|
def disable(self):
|
|
self.enabled = False
|
|
self.save() |