from api.models import Deleted
from catalogue.forms import BookImportForm
from catalogue.models import Book, Tag, BookMedia, Fragment
from api.models import Deleted
from catalogue.forms import BookImportForm
from catalogue.models import Book, Tag, BookMedia, Fragment
fields = ['book', 'anchor', 'text', 'url', 'themes']
@piwik_track
fields = ['book', 'anchor', 'text', 'url', 'themes']
@piwik_track
- def read(self, request, book, anchor):
+ def read(self, request, slug, anchor):
- return API_BASE + reverse("api_fragment", args=[fragment.book.urlid(), fragment.anchor])
+ return API_BASE + reverse("api_fragment",
+ args=[fragment.book.slug, fragment.anchor])
allowed_methods = ('POST',)
def create(self, request):
allowed_methods = ('POST',)
def create(self, request):