EntityCategory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __unicode__() 0 2 1
1
##########################################################################
2
# MET v2 Metadate Explorer Tool
3
#
4
# This Software is Open Source. See License: https://github.com/TERENA/met/blob/master/LICENSE.md
5
# Copyright (c) 2012, TERENA All rights reserved.
6
#
7
# This Software is based on MET v1 developed for TERENA by Yaco Sistemas, http://www.yaco.es/
8
# MET v2 was developed for TERENA by Tamim Ziai, DAASI International GmbH, http://www.daasi.de
9
# Current version of MET has been revised for performance improvements by Andrea Biancini,
10
# Consortium GARR, http://www.garr.it
11
##########################################################################
12
13
from django.db import models
14
from django.utils.translation import ugettext_lazy as _
15
16
17
class EntityCategory(models.Model):
18
    """
19
    Description of an entity category as defined in SAML here:
20
    http://macedir.org/draft-macedir-entity-category-00.html
21
    """
22
    category_id = models.CharField(verbose_name='Entity category ID',
23
                                   max_length=1000,
24
                                   blank=False, null=False,
25
                                   help_text=_(u'The ID of the entity category'))
26
27
    name = models.CharField(verbose_name='Entity category name',
28
                            max_length=1000,
29
                            blank=True, null=True,
30
                            help_text=_(u'The name of the entity category'))
31
32
    def __unicode__(self):
33
        return self.name or self.category_id
34