Django - list related instances of class

Django - list related instances of class

I have a Projects app with two classes in my models.py (Project, and Deadline). Each Project can have multiple deadlines and my end goal is to list out a Project's deadlines on my web page.

I have a Projects app with two classes in my models.py (Project, and Deadline). Each Project can have multiple deadlines and my end goal is to list out a Project's deadlines on my web page.

class Project(models.model):
    proj_name = models.CharField(max_length= 100, verbose_name = 'Project Name')

class Deadline(models.model): deadline_name = models.CharField(max_length= 100, verbose_name = 'Deadline Name') proj_name = models.ForeignKey(Project, on_delete=models.CASCADE)

I'm calling the project's deadlines in my html by {{ deadline.proj_name }} but it returns nothing. I've read through the documentation and I think I should be doing this through querysets? Can anybody lead me in the right direction? I think I should be calling {{ projects.deadlines }} but I don't know how to structure this to make it happen (sorry still learning)

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Python Django Tutorial | Django Course

🔥Intellipaat Django course: https://intellipaat.com/python-django-training/ 👉This Python Django tutorial will help you learn what is django web development &...

Advanced Django Models: Improve Your Python Development

Master Django models, a core concept of the popular web framework. Dive into advanced topics, like how the Active Record pattern works for Django’s ORM systems