TestModel   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
c 1
b 0
f 0
dl 0
loc 5
rs 10
1
from django.db import models
2
from django.db.models import CASCADE
3
from django.contrib.auth.models import User
4
5
# User = get_user_model()
6
7
8
class TestModel(models.Model):
9
10
    name = models.CharField(blank=True, null=True, max_length=100)
11
    email = models.EmailField(blank=True, null=True)
12
    created_at = models.DateTimeField(auto_now=True)
13
14
15
class TestChildModel(models.Model):
16
    model = models.ForeignKey(
17
        TestModel,
18
        blank=True,
19
        null=True,
20
        related_name='children',
21
        on_delete=CASCADE
22
    )
23