Django generic DeleteView authentication

I want to create a post that only the author and the authorized groups can delete.

class PostDeleteView(DeleteView):
   model = Posts
   template_name = 'deletepost.html'
   success_url = '/home'

Currently all users can delete posts.



from Recent Questions - Stack Overflow https://ift.tt/2Rcrx5L
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept