Since you are deleting the child model object none of these matters. But if
you are deleting the parent model object on_delete matters.

On Sat, 9 Nov 2019, 6:35 pm Jordan Micle, <jordanmicle2...@gmail.com> wrote:

> when you use foreingkey you will set these options
>>
> here, change like this
> on_delete=models.SET_NULL
> user = models.ForeignKey(User, null=True, on_delete=models.SET_NULL)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2ea6ad8b-022e-4db1-adf0-9642565eb608%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/2ea6ad8b-022e-4db1-adf0-9642565eb608%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFFcXKLZaGmfBZF4rtXeKa64D%2B9QgQFW%3D_sabmsEvr5pjabLGA%40mail.gmail.com.

Reply via email to