Welcome! When posting code here, enclose the code (or templates, error messages, etc) between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted.
(I’ve taken the liberty of doing this for you for this post.)
The line being highlighted in the error (the <a> tag) is trying to call book.get_absolute_url to get a url.
That function is trying to reverse the url named book-detail, which requires a parameter for slug.
In your function you have:
but the docs show that you should be passing the parameter as a list and not a set. This should be args=[self.slug].
Note, if this does not resolve the issue, the other potential problem is that you could have a book that does not have a slug for a particular instance. Check your database to ensure that everybook has a value for slug. (You don’t show your model here, so we can’t check that for other possible issues.)
from django.db import models
from django.urls import reverse
from django.core.validators import MinValueValidator , MaxValueValidator
from django.utils.text import slugify
You need to verify that every instance of Book has a value for slug. You need to inspect your database for that.
Also note that the problem is not in book_detail. You haven’t gotten that far. The error message is telling you that the problem exists in the index view. (See the line Raised during.)