network_inventory/inventory/models/software.py

24 lines
525 B
Python
Raw Normal View History

2019-06-10 21:56:21 +02:00
from django.db import models
from .category import Category
class SoftwareArchitecture(Category):
class Meta:
verbose_name_plural = "Software Architectures"
class SoftwareCategory(Category):
class Meta:
verbose_name_plural = "Software Categories"
class Software(models.Model):
name = models.CharField(max_length=50)
category = models.ForeignKey(SoftwareCategory, models.SET_NULL, null=True,
2019-07-19 16:32:24 +02:00
blank=True)
2019-06-10 21:56:21 +02:00
def __str__(self):
return self.name