Add functionality to clear blacklisted music videos in GroupClearBlacklistView and update group detail template
This commit is contained in:
parent
c55861c439
commit
e64bb8b95a
3 changed files with 15 additions and 0 deletions
|
@ -246,3 +246,12 @@ class YoutubeCallbackView(LoginRequiredMixin, View):
|
|||
},
|
||||
)
|
||||
return redirect("/")
|
||||
|
||||
|
||||
class GroupClearBlacklistView(OwnerFilterMixin, SingleObjectMixin, View):
|
||||
model = models.Group
|
||||
|
||||
def get(self, request, pk):
|
||||
group = self.get_object()
|
||||
group.musicvideo_set.filter(blacklisted=True).update(blacklisted=False)
|
||||
return redirect(group)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue