{"action":"created","comment":{"url":"https://api.github.com/repos/DSIW/sdf/pulls/comments/45787314","id":45787314,"diff_hunk":"@@ -87,4 +100,96 @@ def changePassword(request):\n             return HttpResponseRedirect(reverse('app:startPage'))\n     else:\n         form = PasswordChangeForm(user=request.user)\n-    return render_to_response('app/change_password.html', {'form': form}, RequestContext(request))\n\\ No newline at end of file\n+        action = 'http://' + HttpRequest.get_host(request) + reverse('app_user:change_password')\n+    return render_to_response('app_user/password.html', {'form': form, 'action': action}, RequestContext(request))\n+\n+def sendPasswordResetEmail(request):\n+\temail = request.POST.get('email', '')\n+\tuser=User.objects.filter(email=email).first()\n+\n+\tresult = None\n+\n+\tif user is not None:\n+\t\tsubject = \"Password Zurücksetzen book²\"\n+\n+\t\tconfirmId = get_random_string(length=32)\n+\t\tresult = PasswordReset.objects.filter(user=user).first()\n+\n+\t\t# create entry if not exists\n+\t\tif result is None:\n+ \t\t\tresult = PasswordReset()\n+\n+\t\t# add/edit entry\n+\t\tresult.uuid = confirmId\n+\t\tresult.user = user\n+\t\tresult.save()\n+\n+\t\tlink = 'http://' + HttpRequest.get_host(request) + reverse('app_user:new_password', kwargs={'uuid': confirmId})\n+\t\tmessage = 'Password Zurücksetzen in book².<br> Zur Bestätigung des Password Zurücksetzens betätigen Sie bitte folgenden Link: <a href=\"' + link + '\">Bestätigen</a><br>Sollten Sie den Link nicht nutzen könnten dann kopieren Sie bitte folgende URL in Ihren Browser:<br> ' + link + '<br><br>Wir wünschen Ihnen viel Spaß beim Shoppen<br>Ihr book² team'\n+\n+\t\tresult = send_mail(subject, message, settings.EMAIL_HOST_USER, [email], fail_silently=False, html_message=message)\n+\n+\t\t#result = EmailMessage(subject, message, [], [email], html_message=message).send()\n+\n+\treturn result","path":"app_user/views.py","position":73,"original_position":73,"commit_id":"87f30c2318c2a0e5913530d7ec5788f480405c47","original_commit_id":"87f30c2318c2a0e5913530d7ec5788f480405c47","user":{"login":"localh0rzd","id":2762085,"avatar_url":"https://avatars.githubusercontent.com/u/2762085?v=3","gravatar_id":"","url":"https://api.github.com/users/localh0rzd","html_url":"https://github.com/localh0rzd","followers_url":"https://api.github.com/users/localh0rzd/followers","following_url":"https://api.github.com/users/localh0rzd/following{/other_user}","gists_url":"https://api.github.com/users/localh0rzd/gists{/gist_id}","starred_url":"https://api.github.com/users/localh0rzd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localh0rzd/subscriptions","organizations_url":"https://api.github.com/users/localh0rzd/orgs","repos_url":"https://api.github.com/users/localh0rzd/repos","events_url":"https://api.github.com/users/localh0rzd/events{/privacy}","received_events_url":"https://api.github.com/users/localh0rzd/received_events","type":"User","site_admin":false},"body":"EmailThread nutzen wäre sinnvoll, da ansonsten die Seite bis zum erfolgreichen/erfolglosen Versand blockiert.","created_at":"2015-11-24T20:05:57Z","updated_at":"2015-11-24T20:05:57Z","html_url":"https://github.com/DSIW/sdf/pull/34#discussion_r45787314","pull_request_url":"https://api.github.com/repos/DSIW/sdf/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/DSIW/sdf/pulls/comments/45787314"},"html":{"href":"https://github.com/DSIW/sdf/pull/34#discussion_r45787314"},"pull_request":{"href":"https://api.github.com/repos/DSIW/sdf/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/DSIW/sdf/pulls/34","id":51668908,"html_url":"https://github.com/DSIW/sdf/pull/34","diff_url":"https://github.com/DSIW/sdf/pull/34.diff","patch_url":"https://github.com/DSIW/sdf/pull/34.patch","issue_url":"https://api.github.com/repos/DSIW/sdf/issues/34","number":34,"state":"open","locked":false,"title":"Password reset","user":{"login":"Gilga","id":4208274,"avatar_url":"https://avatars.githubusercontent.com/u/4208274?v=3","gravatar_id":"","url":"https://api.github.com/users/Gilga","html_url":"https://github.com/Gilga","followers_url":"https://api.github.com/users/Gilga/followers","following_url":"https://api.github.com/users/Gilga/following{/other_user}","gists_url":"https://api.github.com/users/Gilga/gists{/gist_id}","starred_url":"https://api.github.com/users/Gilga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gilga/subscriptions","organizations_url":"https://api.github.com/users/Gilga/orgs","repos_url":"https://api.github.com/users/Gilga/repos","events_url":"https://api.github.com/users/Gilga/events{/privacy}","received_events_url":"https://api.github.com/users/Gilga/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-24T14:51:54Z","updated_at":"2015-11-24T20:05:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a7bb60bbc8dfd0329de276bd8c6f42558be691f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DSIW/sdf/pulls/34/commits","review_comments_url":"https://api.github.com/repos/DSIW/sdf/pulls/34/comments","review_comment_url":"https://api.github.com/repos/DSIW/sdf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DSIW/sdf/issues/34/comments","statuses_url":"https://api.github.com/repos/DSIW/sdf/statuses/87f30c2318c2a0e5913530d7ec5788f480405c47","head":{"label":"DSIW:password_reset","ref":"password_reset","sha":"87f30c2318c2a0e5913530d7ec5788f480405c47","user":{"login":"DSIW","id":744745,"avatar_url":"https://avatars.githubusercontent.com/u/744745?v=3","gravatar_id":"","url":"https://api.github.com/users/DSIW","html_url":"https://github.com/DSIW","followers_url":"https://api.github.com/users/DSIW/followers","following_url":"https://api.github.com/users/DSIW/following{/other_user}","gists_url":"https://api.github.com/users/DSIW/gists{/gist_id}","starred_url":"https://api.github.com/users/DSIW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSIW/subscriptions","organizations_url":"https://api.github.com/users/DSIW/orgs","repos_url":"https://api.github.com/users/DSIW/repos","events_url":"https://api.github.com/users/DSIW/events{/privacy}","received_events_url":"https://api.github.com/users/DSIW/received_events","type":"User","site_admin":false},"repo":{"id":44266686,"name":"sdf","full_name":"DSIW/sdf","owner":{"login":"DSIW","id":744745,"avatar_url":"https://avatars.githubusercontent.com/u/744745?v=3","gravatar_id":"","url":"https://api.github.com/users/DSIW","html_url":"https://github.com/DSIW","followers_url":"https://api.github.com/users/DSIW/followers","following_url":"https://api.github.com/users/DSIW/following{/other_user}","gists_url":"https://api.github.com/users/DSIW/gists{/gist_id}","starred_url":"https://api.github.com/users/DSIW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSIW/subscriptions","organizations_url":"https://api.github.com/users/DSIW/orgs","repos_url":"https://api.github.com/users/DSIW/repos","events_url":"https://api.github.com/users/DSIW/events{/privacy}","received_events_url":"https://api.github.com/users/DSIW/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DSIW/sdf","description":"SecondHandbookBooks (SHB) is a community driven platform for second hand books written in Python.","fork":false,"url":"https://api.github.com/repos/DSIW/sdf","forks_url":"https://api.github.com/repos/DSIW/sdf/forks","keys_url":"https://api.github.com/repos/DSIW/sdf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DSIW/sdf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DSIW/sdf/teams","hooks_url":"https://api.github.com/repos/DSIW/sdf/hooks","issue_events_url":"https://api.github.com/repos/DSIW/sdf/issues/events{/number}","events_url":"https://api.github.com/repos/DSIW/sdf/events","assignees_url":"https://api.github.com/repos/DSIW/sdf/assignees{/user}","branches_url":"https://api.github.com/repos/DSIW/sdf/branches{/branch}","tags_url":"https://api.github.com/repos/DSIW/sdf/tags","blobs_url":"https://api.github.com/repos/DSIW/sdf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DSIW/sdf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DSIW/sdf/git/refs{/sha}","trees_url":"https://api.github.com/repos/DSIW/sdf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DSIW/sdf/statuses/{sha}","languages_url":"https://api.github.com/repos/DSIW/sdf/languages","stargazers_url":"https://api.github.com/repos/DSIW/sdf/stargazers","contributors_url":"https://api.github.com/repos/DSIW/sdf/contributors","subscribers_url":"https://api.github.com/repos/DSIW/sdf/subscribers","subscription_url":"https://api.github.com/repos/DSIW/sdf/subscription","commits_url":"https://api.github.com/repos/DSIW/sdf/commits{/sha}","git_commits_url":"https://api.github.com/repos/DSIW/sdf/git/commits{/sha}","comments_url":"https://api.github.com/repos/DSIW/sdf/comments{/number}","issue_comment_url":"https://api.github.com/repos/DSIW/sdf/issues/comments{/number}","contents_url":"https://api.github.com/repos/DSIW/sdf/contents/{+path}","compare_url":"https://api.github.com/repos/DSIW/sdf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DSIW/sdf/merges","archive_url":"https://api.github.com/repos/DSIW/sdf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DSIW/sdf/downloads","issues_url":"https://api.github.com/repos/DSIW/sdf/issues{/number}","pulls_url":"https://api.github.com/repos/DSIW/sdf/pulls{/number}","milestones_url":"https://api.github.com/repos/DSIW/sdf/milestones{/number}","notifications_url":"https://api.github.com/repos/DSIW/sdf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DSIW/sdf/labels{/name}","releases_url":"https://api.github.com/repos/DSIW/sdf/releases{/id}","created_at":"2015-10-14T18:04:27Z","updated_at":"2015-10-25T23:45:09Z","pushed_at":"2015-11-24T19:08:10Z","git_url":"git://github.com/DSIW/sdf.git","ssh_url":"git@github.com:DSIW/sdf.git","clone_url":"https://github.com/DSIW/sdf.git","svn_url":"https://github.com/DSIW/sdf","homepage":"","size":4639,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"develop"}},"base":{"label":"DSIW:develop","ref":"develop","sha":"735d73cdedb06793813d5536a59ec26ccf330147","user":{"login":"DSIW","id":744745,"avatar_url":"https://avatars.githubusercontent.com/u/744745?v=3","gravatar_id":"","url":"https://api.github.com/users/DSIW","html_url":"https://github.com/DSIW","followers_url":"https://api.github.com/users/DSIW/followers","following_url":"https://api.github.com/users/DSIW/following{/other_user}","gists_url":"https://api.github.com/users/DSIW/gists{/gist_id}","starred_url":"https://api.github.com/users/DSIW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSIW/subscriptions","organizations_url":"https://api.github.com/users/DSIW/orgs","repos_url":"https://api.github.com/users/DSIW/repos","events_url":"https://api.github.com/users/DSIW/events{/privacy}","received_events_url":"https://api.github.com/users/DSIW/received_events","type":"User","site_admin":false},"repo":{"id":44266686,"name":"sdf","full_name":"DSIW/sdf","owner":{"login":"DSIW","id":744745,"avatar_url":"https://avatars.githubusercontent.com/u/744745?v=3","gravatar_id":"","url":"https://api.github.com/users/DSIW","html_url":"https://github.com/DSIW","followers_url":"https://api.github.com/users/DSIW/followers","following_url":"https://api.github.com/users/DSIW/following{/other_user}","gists_url":"https://api.github.com/users/DSIW/gists{/gist_id}","starred_url":"https://api.github.com/users/DSIW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSIW/subscriptions","organizations_url":"https://api.github.com/users/DSIW/orgs","repos_url":"https://api.github.com/users/DSIW/repos","events_url":"https://api.github.com/users/DSIW/events{/privacy}","received_events_url":"https://api.github.com/users/DSIW/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DSIW/sdf","description":"SecondHandbookBooks (SHB) is a community driven platform for second hand books written in Python.","fork":false,"url":"https://api.github.com/repos/DSIW/sdf","forks_url":"https://api.github.com/repos/DSIW/sdf/forks","keys_url":"https://api.github.com/repos/DSIW/sdf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DSIW/sdf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DSIW/sdf/teams","hooks_url":"https://api.github.com/repos/DSIW/sdf/hooks","issue_events_url":"https://api.github.com/repos/DSIW/sdf/issues/events{/number}","events_url":"https://api.github.com/repos/DSIW/sdf/events","assignees_url":"https://api.github.com/repos/DSIW/sdf/assignees{/user}","branches_url":"https://api.github.com/repos/DSIW/sdf/branches{/branch}","tags_url":"https://api.github.com/repos/DSIW/sdf/tags","blobs_url":"https://api.github.com/repos/DSIW/sdf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DSIW/sdf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DSIW/sdf/git/refs{/sha}","trees_url":"https://api.github.com/repos/DSIW/sdf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DSIW/sdf/statuses/{sha}","languages_url":"https://api.github.com/repos/DSIW/sdf/languages","stargazers_url":"https://api.github.com/repos/DSIW/sdf/stargazers","contributors_url":"https://api.github.com/repos/DSIW/sdf/contributors","subscribers_url":"https://api.github.com/repos/DSIW/sdf/subscribers","subscription_url":"https://api.github.com/repos/DSIW/sdf/subscription","commits_url":"https://api.github.com/repos/DSIW/sdf/commits{/sha}","git_commits_url":"https://api.github.com/repos/DSIW/sdf/git/commits{/sha}","comments_url":"https://api.github.com/repos/DSIW/sdf/comments{/number}","issue_comment_url":"https://api.github.com/repos/DSIW/sdf/issues/comments{/number}","contents_url":"https://api.github.com/repos/DSIW/sdf/contents/{+path}","compare_url":"https://api.github.com/repos/DSIW/sdf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DSIW/sdf/merges","archive_url":"https://api.github.com/repos/DSIW/sdf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DSIW/sdf/downloads","issues_url":"https://api.github.com/repos/DSIW/sdf/issues{/number}","pulls_url":"https://api.github.com/repos/DSIW/sdf/pulls{/number}","milestones_url":"https://api.github.com/repos/DSIW/sdf/milestones{/number}","notifications_url":"https://api.github.com/repos/DSIW/sdf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DSIW/sdf/labels{/name}","releases_url":"https://api.github.com/repos/DSIW/sdf/releases{/id}","created_at":"2015-10-14T18:04:27Z","updated_at":"2015-10-25T23:45:09Z","pushed_at":"2015-11-24T19:08:10Z","git_url":"git://github.com/DSIW/sdf.git","ssh_url":"git@github.com:DSIW/sdf.git","clone_url":"https://github.com/DSIW/sdf.git","svn_url":"https://github.com/DSIW/sdf","homepage":"","size":4639,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/DSIW/sdf/pulls/34"},"html":{"href":"https://github.com/DSIW/sdf/pull/34"},"issue":{"href":"https://api.github.com/repos/DSIW/sdf/issues/34"},"comments":{"href":"https://api.github.com/repos/DSIW/sdf/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/DSIW/sdf/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/DSIW/sdf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DSIW/sdf/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/DSIW/sdf/statuses/87f30c2318c2a0e5913530d7ec5788f480405c47"}}}}