Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Forms Model Forms Using a Model Form

Dmitry Karamin
Dmitry Karamin
10,099 Points

quiz.get_absolute_url() - why does it work?

i can't get why line quiz.get_absolute_url() works quiz is an instance of form which is instance of forms.QuizForm

i cas suggest that forms.QuizForm has class Meta: with model = models.Quiz which has get_absolute_url() method. Am i right?

1 Answer

Terrell Stewart
PLUS
Terrell Stewart
Courses Plus Student 4,228 Points

My guess is that QuizForm is like an instance of the Quiz model which has the get_absolute_url method. So yes I think your first suggestion is correct.