2019-06-10 21:56:21 +02:00
|
|
|
from django.db import models
|
2020-01-07 22:20:07 +01:00
|
|
|
|
|
|
|
from core.models import Category
|
2019-06-10 21:56:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
class SoftwareArchitecture(Category):
|
|
|
|
|
|
|
|
class Meta:
|
2020-07-07 22:12:57 +02:00
|
|
|
ordering = ['name']
|
2019-06-10 21:56:21 +02:00
|
|
|
verbose_name_plural = "Software Architectures"
|
|
|
|
|
|
|
|
|
|
|
|
class SoftwareCategory(Category):
|
|
|
|
|
|
|
|
class Meta:
|
2020-07-07 22:12:57 +02:00
|
|
|
ordering = ['name']
|
2019-06-10 21:56:21 +02:00
|
|
|
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
|
|
|
|
2020-07-07 22:12:57 +02:00
|
|
|
class Meta:
|
|
|
|
ordering = ['name']
|
|
|
|
|
2019-06-10 21:56:21 +02:00
|
|
|
def __str__(self):
|
|
|
|
return self.name
|