mirror of
https://github.com/django/django.git
synced 2024-12-30 21:16:26 +00:00
7b94847e38
Bug in 58b27e0dbb
.
16 lines
389 B
Python
16 lines
389 B
Python
from django.db import models
|
|
from django.utils import timezone
|
|
|
|
|
|
class RelatedModel(models.Model):
|
|
simple = models.ForeignKey("SimpleModel", models.CASCADE, null=True)
|
|
|
|
|
|
class SimpleModel(models.Model):
|
|
field = models.IntegerField()
|
|
created = models.DateTimeField(default=timezone.now)
|
|
|
|
|
|
class ManyToManyModel(models.Model):
|
|
simples = models.ManyToManyField("SimpleModel")
|