summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2022-01-04 05:47:24 +0000
committerGitHub <noreply@github.com>2022-01-04 06:47:24 +0100
commitccafad2e429468c518c80fb178f9e7a3f06e78e1 (patch)
treed07d287b957898a3b3e4f3f14cd9e07b959298bf /docs
parent482ee63b6f320cd4a834cb46fc651877bd2f2e28 (diff)
Avoided suggestion of plain text database password in sessions topic.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/http/sessions.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
index 9c662b87b5..34dabdd536 100644
--- a/docs/topics/http/sessions.txt
+++ b/docs/topics/http/sessions.txt
@@ -417,7 +417,7 @@ This simplistic view logs in a "member" of the site::
def login(request):
m = Member.objects.get(username=request.POST['username'])
- if m.password == request.POST['password']:
+ if m.check_password(request.POST['password']):
request.session['member_id'] = m.id
return HttpResponse("You're logged in.")
else: