# models.py
from django.db import models
class Title(models.Model):
name = models.CharField(max_length=100, unique=True)
# Add other fields as needed
# views.py
from django.shortcuts import render, get_object_or_404
from .models import Title
def title_page(request, title_id):
title = get_object_or_404(Title, pk=title_id)
# Retrieve and display data associated with the title
# Render a template to display the data
return render(request, 'title_page.html', {'title': title})
<!-- base.html -->
<nav>
<ul>
<li><a href="{% url 'home' %}">Home</a></li>
<li class="dropdown">
<a href="#" class="dropbtn">Titles</a>
<div class="dropdown-content">
{% for title in titles %}
<a href="{% url 'title_page'
title.id %}">{{
title.name }}</a>
{% endfor %}
</div>
</li>
<!-- Add more navigation items as needed -->
</ul>
</nav>