UpdateView and DeleteView

71 views
Skip to first unread message

Simon Connah

unread,
Aug 26, 2023, 6:20:20 AM8/26/23
to django...@googlegroups.com
I want to make sure that the only people who can update and delete an object are either superusers or the person that originally created them but I'm not sure how to go about doing it. Can someone point me in the right direction?

I'm not sure which method(s) to override.

Thank you.
signature.asc

Ruby

unread,
Aug 26, 2023, 9:08:31 AM8/26/23
to django...@googlegroups.com
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/RC50Lr8yv1j7M_cjvPHLpvLJ1RzHJP3QQaF5oQu4vAmfeijfMbprfVyyHGTIvg9udwKhe_-XcM9tYH9tRyaX-MDQauXKf3PiJbMOq2hEfj4%3D%40protonmail.com.

Simon Connah

unread,
Aug 26, 2023, 11:23:41 AM8/26/23
to django...@googlegroups.com
Thank you! That is very helpful.

------- Original Message -------
signature.asc

Ruby

unread,
Aug 26, 2023, 2:30:50 PM8/26/23
to django...@googlegroups.com
I'm glad it worked out,
Consider using LoginRequiredMixin to ensure that current user is authenticated before accessing the view.


--
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...@googlegroups.com.

Simon Connah

unread,
Aug 27, 2023, 4:35:52 AM8/27/23
to django...@googlegroups.com
Will do! Thank you for your help.

------- Original Message -------
signature.asc
Reply all
Reply to author
Forward
0 new messages