How to you create links (i.e. href) using SlugField for the output of Django's ListView generic class? Right now I can list all persons in the database using the code below but I want links using slug when clicked will show the person's description.
models.py
class Person(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
slug = models.SlugField(max_length=50)
description = models.TextField()
views.py
class PersonList(ListView):
model = Person
person_list.html
<ul>
{% for person in object_list %}
<li>{{ person.first_name }} {{ person.last_name }}</li>
{% endfor %}
</ul>