models.py 455 B

12345678910111213141516
  1. from django.db import models
  2. from django.contrib.auth.models import Group
  3. class Instance(models.Model):
  4. hostname = models.CharField(max_length=120, primary_key=True)
  5. alias = models.CharField(max_length=30)
  6. port = models.IntegerField()
  7. key = models.CharField(max_length=100)
  8. https = models.BooleanField()
  9. main = models.BooleanField(default=False)
  10. group = models.ForeignKey(Group, null=True, on_delete=models.SET_NULL)