mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
58b27e0dbb
Thanks Simon Charette for reviews. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
12 lines
298 B
Python
12 lines
298 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)
|