﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3393	login view assumes 'set_test_cookie' has been called	James Bennett	Jacob	"Currently, `django.contrib.auth.views.login` instantiates `AuthenticationForm` by passing it the request, which is optional; when this happens, `AuthenticationForm` will fail on valid logins unless `set_test_cookie` has been called previously. The `login` view itself does this, but this prevents easy reusability -- it's a fairly common use case to want to display a login box on each page for non-authenticated users, which means that each view in use must call `set_test_cookie` to ensure that the POST to `login` won't fail.

A simple solution to this would be to stop passing the request to `AuthenticationForm`. Perhaps a more flexible solution would be for `login` to begin taking a keyword argument to determine whether it should pass the request or not (and hence, whether `set_test_cookie` will be required or not)"		closed	Contrib apps	dev		fixed	auth login set_test_cookie		Accepted	1	0	0	1	0	0
