from django.db import models # Create your models here. class Network(models.Model): name = models.CharField( max_length=40, unique=True, ) nickname = models.CharField( max_length=31, default='RotBot', ) username = models.CharField( max_length=31, default='pyRot', ) password = models.CharField( null=True, blank=True, max_length=31, ) home_channel = models.CharField( max_length=64, default='#RotBot', ) command_character = models.CharField( max_length=1, default='!' ) help_character = models.CharField( max_length=1, default='@' ) class Host(models.Model): network = models.ForeignKey( 'Network', ) address = models.CharField( max_length=60, unique=True, ) port = models.PositiveSmallIntegerField( = ) ssl = models.BooleanField( default=True, )