Skip to content
Snippets Groups Projects
Unverified Commit 9792258b authored by Dominik George's avatar Dominik George
Browse files

Add profile field to display

parent 1f75efe4
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,10 @@ class EditDisplayGroupForm(ExtensibleForm):
class EditDisplayForm(ExtensibleForm):
layout = Layout("hostname", "display_group")
layout = Layout(
"display_group",
Row("hostname", "profile"),
)
class Meta:
model = Display
......
......@@ -17,10 +17,16 @@ class DisplayGroup(ExtensibleModel):
class Display(ExtensibleModel):
PROFILE_CHOICES = [
("impressive", _("Impressive based PDF/image/video display")),
("surf", _("Website display based on surf browser")),
]
display_group = models.ForeignKey(
DisplayGroup, verbose_name=_("Display group"), on_delete=models.CASCADE
)
hostname = models.CharField(max_length=255, verbose_name=_("Hostname"))
profile = models.CharField(max_length=10, verbose_name=_("Profile"), choices=PROFILE_CHOICES)
def __str__(self) -> str:
return self.hostname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment