Weights   A
last analyzed

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __str__() 0 2 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