예제 #1
0
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')
예제 #2
0
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')