diff --git a/books/urls.py b/books/urls.py index 9e58d50..5f3ad79 100644 --- a/books/urls.py +++ b/books/urls.py @@ -4,5 +4,5 @@ from . import views urlpatterns=[ path('',views.index,name='bidex'), path('',views.book,name='bbook'), - path('/',views.chapter,name='bchap'), + path('/',views.chapter,name='bchap'), ] \ No newline at end of file diff --git a/books/views.py b/books/views.py index ac748c4..9b727df 100644 --- a/books/views.py +++ b/books/views.py @@ -58,5 +58,5 @@ def book(bookurl): @rerender def chapter(bookurl,chapnum): book=models.Book.objects.filter(url=bookurl)[0] - chapter=models.Chapter.objects.filter(book=book,number=chapnum)[0] + chapter=models.Chapter.objects.filter(book=book,number=int(chapnum))[0] return {'title':chapter,'content':'

Navigation buttons will come later...

\n'+chapter.contents,'date':chapter.added} \ No newline at end of file