Пример #1
0
class API(models.Model):
    name = models.CharField(max_length=100)
    version = models.CharField(max_length=100)
    specification = models.TextField(blank=True)

    def __unicode__(self):
        return self.name

    class Meta:
        verbose_name = "API"
        verbose_name_plural = "APIs"

    @staticmethod
    def getReport(product=None):
        if (product):
            mycontext = {
                'api': API.objects.all,
                'product_name': product.name,
                'autoescape': False
            }
        else:
            mycontext = {
                'api': API.objects.all,
                'product_name': "All products",
                'autoescape': False
            }

        return render_to_latex("admin/fur/api/report_api.tex", mycontext)
Пример #2
0
class References(models.Model):
    title = models.CharField(max_length=100)
    author = models.CharField(max_length=100)
    description = models.TextField(blank=True)
    publisher = models.CharField(max_length=100, blank=True)
    pages = models.CharField(max_length=7, blank=True)
    number = models.IntegerField(max_length=4, blank=True)
    year = models.IntegerField(max_length=4)
    volume = models.IntegerField(max_length=4, blank=True)

    def __unicode__(self):
        return self.title

    @staticmethod
    def getReport(product=None):
        if (product):
            mycontext = {
                'references': References.objects.all,
                'product_name': product.name,
                'autoescape': False
            }
        else:
            mycontext = {
                'references': References.objects.all,
                'product_name': "All products",
                'autoescape': False
            }

        return render_to_latex("admin/fur/references/report_references.tex",
                               mycontext)

    class Meta:
        verbose_name = "References"
        verbose_name_plural = "References"
Пример #3
0
class DDSA(models.Model):
    name = models.CharField(max_length=100)
    description = models.CharField(max_length=100)
    references = models.ManyToManyField('References')
    technology = models.ManyToManyField('Technology')
    scenarios = models.ManyToManyField('AddScenarios')

    def __unicode__(self):
        return self.name

    class Meta:
        verbose_name="DSSA"
        verbose_name_plural="DSSAs"
Пример #4
0
class DDSA(models.Model):
    name = models.CharField(max_length=100)
    introduction = models.TextField(blank=True)
    references = models.ManyToManyField('References')
    technology = models.ManyToManyField('Technology')
    quality_attribute_priority = models.ManyToManyField(
        'QualityScenarios', through='QualityAttributePriority')
    requirements = models.ManyToManyField(Requirement, )

    def __unicode__(self):
        return self.name

    class Meta:
        verbose_name = "DSSA"
        verbose_name_plural = "DSSAs"

    @staticmethod
    def getReport(product=None):
        if (product):
            mycontext = {
                'dssas': DDSA.objects.all,
                'product_name': product.name,
                'autoescape': False
            }
        else:
            mycontext = {
                'dssas': DDSA.objects.all,
                'product_name': "All products",
                'autoescape': False
            }

        return render_to_latex("admin/fur/dssa/report_dssa.tex", mycontext)
Пример #5
0
class Architecture(models.Model):
    name = models.CharField(max_length=200)
    description = models.TextField(max_length=500)
    references = models.ManyToManyField('References',
                                        blank=True,
                                        symmetrical=False,
                                        related_name='mainsteps_funcspec')
Пример #6
0
class QualityAttributePriority(models.Model):
    add_scenarios = models.ForeignKey('QualityScenarios',
                                      on_delete=models.CASCADE,
                                      verbose_name='Quality Scenario')
    dssa = models.ForeignKey('DDSA', on_delete=models.CASCADE)
    priority = models.CharField(max_length=64, choices=PRIORITY)

    def __unicode__(self):
        return self.add_scenarios.name + " " + self.priority
Пример #7
0
class AddScenarios(models.Model):
    name = models.CharField(max_length=100)
    nf_requirement = models.ManyToManyField(Requirement)
    scenario = models.OneToOneField(Scenarios)

    def __unicode__(self):
        return self.name

    class Meta:
        verbose_name="Quality Scenario"
        verbose_name_plural="Quality Scenarios"
Пример #8
0
class TemplateScenarios(models.Model):
    introduction = models.CharField(max_length=100)
    references = models.ManyToManyField('References')
    scenarios = models.ManyToManyField('AddScenarios')

    def __unicode__(self):
        return self.introduction

    class Meta:
        verbose_name="Template Quality Scenario"
        verbose_name_plural="Template Quality Scenarios"
Пример #9
0
class References(models.Model):
    title = models.CharField(max_length=100)
    author = models.CharField(max_length=100)
    description = models.TextField(blank=True)

    def __unicode__(self):
        return self.title

    @staticmethod
    def getReport(product=None):
        if(product):
            mycontext = {'references': References.objects.all,
                         'product_name': product.name,
                         'autoescape': False}
        else:
            mycontext = {'references': References.objects.all,
                         'product_name': "All products",
                         'autoescape': False}

        return render_to_latex("admin/fur/references/report_references.tex",mycontext)
Пример #10
0
class Scenarios(models.Model):
    name = models.CharField(max_length=100)
    stimulus = models.TextField(blank=True)
    response = models.TextField(blank=True)
    strategy = models.TextField(blank=True)
    feature = models.ManyToManyField(Feature)
    nf_requirement = models.ManyToManyField(Requirement)

    def __unicode__(self):
        return self.name

    class Meta:
        verbose_name="Scenario Detail"