Skip to content
Snippets Groups Projects
Commit bfaa8083 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Add Link model for Host

parent f453f6f6
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,15 @@ class Host(models.Model):
return int(host_id) in host_ids
class Link(models.Model):
host = models.ForeignKey(Host, on_delete=models.CASCADE, related_name='links')
description = models.CharField(max_length=8)
url = models.URLField()
def __str__(self):
return '%s: %s' % (self.description, self.url)
class Show(models.Model):
predecessor = models.ForeignKey('self', blank=True, null=True, on_delete=models.CASCADE, related_name='successors',
verbose_name=_("Predecessor"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment