def retweet_profile(request, action, pk): post = Post.objects.get(pk=pk) if action == 'positive': Post.retweet_positive(request.user, post) elif action == 'negative': Post.retweet_negative(request.user, post) return redirect('accounts:view_profile')
def retweet(request, action, pk): post = Post.objects.get(pk=pk) if action == 'positive': Post.retweet_positive(request.user, post) elif action == 'negative': Post.retweet_negative(request.user, post) return redirect('home:home')