# The PK for the model automatically applies to the url path. # Querys model as objects.get(id=pk) class YourView(DetailView): model = YourModel template_name = 'your_model_detail.html'