Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#19614 closed Bug (fixed)

Error in docs example

Reported by: Dima Pravdin Owned by: Aymeric Augustin
Component: Documentation Version: 1.5-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Small error in example about limiting access to logged-in users by the raw way from Django Docs (https://docs.djangoproject.com/en/1.5/topics/auth/default/#the-raw-way):

from django.shortcuts import render

def my_view(request):
    if not request.user.is_authenticated():
        return render('myapp/login_error.html')

The render function require Request argument:
https://docs.djangoproject.com/en/1.5/topics/http/shortcuts/#render

Change History (4)

comment:1 by Aymeric Augustin, 11 years ago

Owner: changed from nobody to Aymeric Augustin
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Aymeric Augustin <aymeric.augustin@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 74d72e21b405956bec9775b90e052e89f03a5e2e:

Fixed #19614 -- Missing request argument in render call.

Thanks Dima Pravdin for the report.

comment:3 by Aymeric Augustin <aymeric.augustin@…>, 11 years ago

In 6428f1cb72b912a94217fb22eb187f5b80f7088f:

[1.5.x] Fixed #19614 -- Missing request argument in render call.

Thanks Dima Pravdin for the report.

Backport of 74d72e2.

comment:4 by Aymeric Augustin <aymeric.augustin@…>, 11 years ago

In 6428f1cb72b912a94217fb22eb187f5b80f7088f:

[1.5.x] Fixed #19614 -- Missing request argument in render call.

Thanks Dima Pravdin for the report.

Backport of 74d72e2.

Note: See TracTickets for help on using tickets.
Back to Top