Created
November 5, 2020 21:20
-
-
Save egitimplus/3eb5fe003b9d40bbb6064bab0e7212aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Car(models.Model): | |
name = models.CharField(max_length=255) | |
class Ceo(models.Model): | |
name = models.CharField(max_length=255, blank=True) | |
car = models.OneToOneField(Car, on_delete=models.CASCADE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment