EntityStat.__unicode__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 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.conf import settings
14
from django.db import models
15
from django.utils.translation import ugettext_lazy as _
16
17
stats = getattr(settings, "STATS")
18
19
20
class EntityStat(models.Model):
21
    """
22
    Model describing a statistic information about an entity.
23
    """
24
25
    time = models.DateTimeField(blank=False, null=False,
26
                                verbose_name=_(u'Metadata time stamp'))
27
28
    feature = models.CharField(max_length=100, blank=False, null=False, db_index=True,
29
                               verbose_name=_(u'Feature name'))
30
31
    value = models.PositiveIntegerField(max_length=100, blank=False, null=False,
32
                                        verbose_name=_(u'Feature value'))
33
34
    federation = models.ForeignKey('Federation', blank=False,
35
                                   verbose_name=_(u'Federations'))
36
37
    def __unicode__(self):
38
        return self.feature
39