Add Project Files

This commit is contained in:
2022-06-20 13:41:51 +03:00
parent a5aecd6dda
commit 09e209b988
24 changed files with 388 additions and 51 deletions

21
hosts/models.py Normal file
View File

@@ -0,0 +1,21 @@
from django.db import models
class Host(models.Model):
"""
Host model
"""
host_name = models.URLField("Host", max_length=100)
port = models.PositiveSmallIntegerField("Port", default=80)
status = models.BooleanField("Status", default=True)
status_code = models.PositiveSmallIntegerField("Status Code", default=200)
created = models.DateTimeField("Created", auto_now_add=True)
updated = models.DateTimeField("Updated", auto_now=True)
class Meta:
verbose_name = "Host"
verbose_name_plural = "Hosts"
ordering = ["-created"]
def __str__(self):
return self.host_name