Answers for "django foreign key field on delete do nothing"

1

django foreign key field on delete do nothing

from django.db import models

class Car(models.Model):
    manufacturer = models.ForeignKey('Manufacturer',on_delete=models.DO_NOTHING,)

class Manufacturer(models.Model):
    pass
Posted by: Guest on August-27-2021

Code answers related to "django foreign key field on delete do nothing"

Python Answers by Framework

Browse Popular Code Answers by Language