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

Christopher Gunawan
Christopher Gunawan
10,754 Points

What is form_class?

Can someone explain what form_class is? I don't think Kenneth went over it in the lesson. Thank you!

1 Answer

Hi Christopher 'form_class' is used in Django Class Based to depict the Form to be used in a class based view.

See example in the docs: https://docs.djangoproject.com/en/2.1/topics/class-based-views/generic-editing/

Christopher Gunawan
Christopher Gunawan
10,754 Points

Thank you Stuart. I think the class just jumped around a bit and I got confused. I will continue with the class based views tutorials and hope it will make more sense later.