Thursday, June 23, 2011

Re: Django password_change

Hi,

Maybe you made a mistake, but your url says /account/password/change, but you put the password*.html files to /templates/registration. Shouldn't it be inside your project's templates/account directory? Maybe that is why you're getting a 404?

Just a guess

Eiji

On Thu, Jun 23, 2011 at 11:53 AM, Mark L. <marklocklear@gmail.com> wrote:
Hey guys, I'm a newb to Django, but have some experience with Rails.
Its fun to see the similarities and differences in both!

After looking through https://docs.djangoproject.com/en/dev/topics/auth/#module-django.contrib.auth.views
Under the section 'Other built-in views' I think password change is
what I want. I did find this on stackoverflow...

http://stackoverflow.com/questions/388800/django-how-do-i-use-the-built-in-password-reset-change-views-with-my-own-templat

...this focuses on password_reset, but I'm thinking it would apply
also to password_change.

So in my urls.py I added these 2 lines...

(r'^/accounts/password/change/$',
'django.contrib.auth.views.password_change',
           {'post_change_redirect' :
'django.contrib.auth.views.password_reset_done'}),


...and I also copied password_change_form.html and
password_change_done.html to /templates/registration/
So after logging in to my system I'm simply trying to go to the /
accounts/password/change/ url. Oh course I'm getting a 404. So I'm not
sure how close I am, but I would appreciate any ideas. Thanx!

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment