﻿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
12372	passing ip to django.contrib.auth.views.password_reset email template	Tim Miller	nobody	"It's pretty much a standard that all password reset verification emails contain the IP address of the person requesting the reset but I couldn't find a simple way to pass request to the email template used with ''django.contrib.auth.views.password_reset''.

urls.py:
{{{
urlpatterns = patterns('django.contrib.auth',
    (r'^reset/$', 'views.password_reset', {
        'template_name': 'users/reset/form.html',
        'email_template_name': 'users/reset/email.html',
        'post_reset_redirect': 'done/',
    }),
)
}}}

Enabling ''django.core.context_processors.request'' in my settings let me reference request within form.html but not within the email.html template. I raised the issue in [http://groups.google.com/group/django-users/browse_thread/thread/1a1645db49fdd1c7?hl=en. this thread] on django-users and Daniel Roseman pointed out that the email sending and creation is done in the save method of the !PasswordResetForm and request does not get passed.

A patch is attached which successfully allowed me to reference ''request.META.REMOTE_ADDR'' in the email template but at the moment I'm fairly clueless when it comes to the django internals so I'd appreciate advice."		closed	contrib.auth	dev		wontfix			Unreviewed	1	0	0	0	0	0
