You need to configure your 'sites'.
You can configure it in admin page

On 03/12/2012 05:30 AM, Scott Macri wrote:
I'm having an issue with my email template for the password_reset
view.  For some reason I keep getting the following instead of my
template text:
You're receiving this e-mail because you requested a password reset
for your user account at example.com.

Please go to the following page and choose a new password:

http://example.com/myapp/reset/1-35j-56ec87rt0bb5d7d60ed17/

Your username, in case you've forgotten: coolapp

Thanks for using our site!

The example.com team

Where is the example.com stuff coming from?

I've created the following template registration/password_reset_email.html

Here is the template code, which I got from another site:

{% load i18n %}{% autoescape off %}
{% trans "You're receiving this e-mail because you requested a
password reset" %}
{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}.

{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url
django.contrib.auth.views.password_reset_confirm uidb36=uid,
token=token %}
{% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ user.username }}

{% trans "Thanks for using our site!" %}

{% blocktrans %}The {{ site_name }} team{% endblocktrans %}

{% endautoescape %}

I guess I need to set the site_name and domain somewhere, is this
supposed to go into the settings.py or something?  Thanks.

Here is the info in my urls.py:

        url(r'^password_reset/$', 'django.contrib.auth.views.password_reset',
name='password_reset'),
        url(r'^password_reset/done/$',
'django.contrib.auth.views.password_reset_done',
name='password_reset_done'),
        
url(r'^reset/(?P<uidb36>[0-9A-Za-z]{1,13})-(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
                'django.contrib.auth.views.password_reset_confirm',
                name='password_reset_confirm'),
        url(r'^reset/done/$',
'django.contrib.auth.views.password_reset_complete',
name='password_reset_complete'),


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to