arneb / django-generic-confirmation

A generic change confirmation app for Django
BSD 3-Clause "New" or "Revised" License
20 stars 11 forks source link

Add on_delete on ForeignKeys for compatibility with Django >= 2 ? #5

Closed alexAubin closed 1 year ago

alexAubin commented 6 years ago

Hellow,

thank you for your work on this module

I was trying to use this with Django >= 2, and it was complaining that ForeignKeys don't have any on_delete attribute (which is now mandatory)

I've set it to SET_NULL, but honestly I have no idea if that's the right fix :s ...

arneb commented 6 years ago

You are right, an update for Django 2 is needed!

I've looked into the docs and it seems to me that models.CASCADE might be the right strategy to use.

If a User object is deleted we can savely delete all pending actions for that User. And if a ContentType object is deleted we should also delete all pending actions regarding this ContentType.

Do you agree?

alexAubin commented 6 years ago

Sure ! I'm still a bit of a noob with Django and the whole DB world, not mentionning that I just discovered this lib, so you know best ^^'

I can either apply the change or you can do it, as you see fit

BoPeng commented 4 years ago

Why has not this PR been merged?