Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19614 closed Bug (fixed)

Error in docs example

Reported by: Dima Pravdin Owned by: aaugustin
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 Changed 2 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to aaugustin
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

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

  • Resolution set to fixed
  • Status changed from assigned to closed

In 74d72e21b405956bec9775b90e052e89f03a5e2e:

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

Thanks Dima Pravdin for the report.

comment:3 Changed 2 years ago by Aymeric Augustin <aymeric.augustin@…>

In 6428f1cb72b912a94217fb22eb187f5b80f7088f:

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

Thanks Dima Pravdin for the report.

Backport of 74d72e2.

comment:4 Changed 2 years ago by Aymeric Augustin <aymeric.augustin@…>

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