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 Authentication Authentication LoginView

James J. McCombie
.a{fill-rule:evenodd;}techdegree seal-36
James J. McCombie
Python Web Development Techdegree Graduate 21,199 Points

Do we need to override the get_form method?

I was just wondering if it is strictly necessary to override this method, as it appears it would default to the class property of form_class which has already been set as AuthenticationForm?

I guess it would protect against other form_class arguments being passed into the view, since you require them to be none, but thinking about this, you would end up returning the form class passed as an argument, which would then cause an error if the first argument was not expected to be a request.

The view seems to work fine without the get_form class method overridden.