Weights.__str__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 2
rs 10
cc 1
1
# coding: utf-8
2
from django.contrib.auth.models import User
3
from django.db import models
4
5
6
class Weights(models.Model):
7
8
    """
9
        Weight
10
    """
11
    user = models.ForeignKey(User, on_delete=models.CASCADE)
12
    weight = models.FloatField()
13
    date_weights = models.DateField()
14
    created = models.DateTimeField(auto_now_add=True)
15
    modified = models.DateTimeField(auto_now=True)
16
17
    class Meta:
18
        verbose_name = 'Weight'
19
        verbose_name_plural = 'Weights'
20
21
    def __str__(self):
22
        return "%s (date: %s)" % (self.weight, self.date_weights)
23