Adds favorit handling
This commit is contained in:
parent
27b9326dd9
commit
a664ad3328
10 changed files with 59 additions and 8 deletions
|
@ -252,6 +252,7 @@ def review(request):
|
|||
return redirect('/book/%s' % book_identifier)
|
||||
|
||||
|
||||
@login_required
|
||||
def comment(request):
|
||||
''' respond to a book review '''
|
||||
form = forms.CommentForm(request.POST)
|
||||
|
@ -264,6 +265,14 @@ def comment(request):
|
|||
return redirect('/')
|
||||
|
||||
|
||||
@login_required
|
||||
def favorite(request, status_id):
|
||||
''' like a status '''
|
||||
status = models.Status.objects.get(id=status_id)
|
||||
outgoing.handle_outgoing_favorite(request.user, status)
|
||||
return redirect(request.headers.get('Referer', '/'))
|
||||
|
||||
|
||||
@login_required
|
||||
def follow(request):
|
||||
''' follow another user, here or abroad '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue