сути, поставить лайк ?
@login_required()
def like_post(request, post_id):
user_pk = request.user.pk
if Like.objects.get(user_id=user_pk,post_id=post_id):
return None
like = Like(user_id=user_pk, post_id=post_id)
like.save()
return None
https://stackoverflow.com/questions/30802431/python-django-return-no-new-page-and-no-reload
rediirect
Обсуждают сегодня