Commit beaa9fce authored by brdunn's avatar brdunn
Browse files

fixed related name field

parent 8a93e0db
{
"python.pythonPath": "/usr/bin/python3",
"python.pythonPath": "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3",
"python.linting.pylintEnabled": false,
"python.linting.enabled": false,
"python.linting.pylamaEnabled": true
......
......@@ -14,18 +14,18 @@ class Record(models.Model):
max_length=12,
choices=RECORD_TYPES,
)
host = models.ForeignKey(Host, related_name='Host', on_delete=models.CASCADE)
host = models.ForeignKey(Host, related_name='record', on_delete=models.CASCADE)
def __str__(self):
return self.record_type + ', id: ' + str(self.id)
class Adapter(models.Model):
host = models.OneToOneField(Host, related_name='Adapter', on_delete=models.CASCADE)
host = models.ForeignKey(Host, related_name='adapter', on_delete=models.CASCADE)
adapter_name = models.CharField(max_length=50, default='Adapter')
def __str__(self):
return self.adapter_name + ', id: ' + str(self.id)
class Mac_Addr(models.Model):
adapter = models.OneToOneField(Adapter, related_name='Mac',on_delete=models.CASCADE)
adapter = models.OneToOneField(Adapter, related_name='mac',on_delete=models.CASCADE)
mac = models.CharField(max_length=18)
def __str__(self):
return self.mac + ', id: ' + str(self.id)
......@@ -50,8 +50,8 @@ class Preamble(models.Model):
return self.pa_subnet_name + ', id: ' + str(self.id)
class Subnet(models.Model):
preamble = models.OneToOneField(Preamble, related_name='Subnet',on_delete=models.CASCADE)
role = models.OneToOneField(Role, related_name='Subnet', on_delete=models.SET_NULL, blank=True, null=True)
preamble = models.OneToOneField(Preamble, related_name='subnet',on_delete=models.CASCADE)
role = models.OneToOneField(Role, related_name='subnet', on_delete=models.SET_NULL, blank=True, null=True)
subnet_name = models.CharField(max_length=128, default='Sub')
def __str__(self):
return self.subnet_name + ', id: ' + str(self.id)
......
ipam_proj/ipam_models_upated.png

163 KB | W: | H:

ipam_proj/ipam_models_upated.png

170 KB | W: | H:

ipam_proj/ipam_models_upated.png
ipam_proj/ipam_models_upated.png
ipam_proj/ipam_models_upated.png
ipam_proj/ipam_models_upated.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment