def delete(self, request, username): try: inUser = request.user otherUser = MyUser.objects.get(username=username) except ObjectDoesNotExist: return OutResponse.invalid_arguments() _status = FollowerRelation.do_unfollow(inUser, otherUser) if not _status: return OutResponse.entry_not_existent() return OutResponse.content_deleted(_status)
def delete(self, request, username): try: inUser = request.user otherUser = MyUser.objects.get(username=username) except ObjectDoesNotExist: return OutResponse.invalid_arguments() _status = FollowerRelation.do_unfollow(inUser,otherUser) if not _status: return OutResponse.entry_not_existent() return OutResponse.content_deleted(_status)
def delete(self, request, spot, username=None): if username is not None: return OutResponse.page_not_found() try: inUser = request.user inSpot = Spot.objects.get(id=spot) except ObjectDoesNotExist: return OutResponse.invalid_arguments() _status = Favorites.delete_favorite(inUser, inSpot) if not _status: return OutResponse.entry_not_existent() return OutResponse.content_deleted()
def delete(self, request,spot, username = None): if username is not None: return OutResponse.page_not_found() try: inUser = request.user inSpot = Spot.objects.get(id=spot) except ObjectDoesNotExist: return OutResponse.invalid_arguments() _status = Favorites.delete_favorite(inUser,inSpot) if not _status: return OutResponse.entry_not_existent() return OutResponse.content_deleted()