url(r'^password_reset/$',
auth_views.PasswordResetView.as_view(template_name='project_name/registration/password_reset_form.html'),
{'post_reset_redirect': 'password_reset/done/'}, name="password_reset"),
from django.contrib.auth.models import User
def password_reset(request):
u = User.objects.get(username='john')
u.set_password('new password')
u.save()
#return формируете интересующую форму
urlpatterns = [
url(r'^password_reset/$', views.password_reset, name='password_reset'),
]