1
0
django-changelist-inline/testing/models.py
2021-07-30 21:29:14 +02:00

14 lines
461 B
Python

# -*- coding: utf-8 -*-
from django.db import models
class Thing(models.Model):
name = models.CharField(max_length=255, null=False, blank=False)
data = models.JSONField(null=True, default=None, blank=True)
class RelatedThing(models.Model):
thing = models.ForeignKey(Thing, null=False, on_delete=models.CASCADE)
name = models.CharField(max_length=255, null=False, blank=False)
data = models.JSONField(null=True, default=None, blank=True)