Tests for fedireads connector

This commit is contained in:
Mouse Reeve
2020-05-10 14:53:45 -07:00
parent d5f46a1c6f
commit 7493abeb53
8 changed files with 1179 additions and 2 deletions

View File

@ -6,7 +6,6 @@ from django.db.models import Avg, Q
from django.http import HttpResponseBadRequest, HttpResponseNotFound,\
JsonResponse
from django.core.exceptions import PermissionDenied
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.decorators.csrf import csrf_exempt
@ -390,7 +389,7 @@ def edit_profile_page(request):
def book_page(request, book_id, tab='friends'):
''' info about a book '''
book = get_or_create_book(book_id)
book = models.Book.objects.select_subclasses().get(id=book_id)
if is_api_request(request):
return JsonResponse(activitypub.get_book(book))