"int - Matches zero or any positive integer". Dirty fix.
This commit is contained in:
parent
a403aa7375
commit
a6aa5f7b5d
@ -4,5 +4,5 @@ from . import views
|
|||||||
urlpatterns=[
|
urlpatterns=[
|
||||||
path('',views.index,name='bidex'),
|
path('',views.index,name='bidex'),
|
||||||
path('<str:bookurl>',views.book,name='bbook'),
|
path('<str:bookurl>',views.book,name='bbook'),
|
||||||
path('<str:bookurl>/<int:chapnum>',views.chapter,name='bchap'),
|
path('<str:bookurl>/<str:chapnum>',views.chapter,name='bchap'),
|
||||||
]
|
]
|
@ -58,5 +58,5 @@ def book(bookurl):
|
|||||||
@rerender
|
@rerender
|
||||||
def chapter(bookurl,chapnum):
|
def chapter(bookurl,chapnum):
|
||||||
book=models.Book.objects.filter(url=bookurl)[0]
|
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':'<p>Navigation buttons will come later...</p>\n'+chapter.contents,'date':chapter.added}
|
return {'title':chapter,'content':'<p>Navigation buttons will come later...</p>\n'+chapter.contents,'date':chapter.added}
|
Loading…
Reference in New Issue
Block a user