Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15664 closed (fixed)

Unexpected brackets when describing commit_on_success

Reported by: henryl Owned by: nobody
Component: Documentation Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the 'Controlling transaction management in views' section of the database transaction page (http://docs.djangoproject.com/en/dev/topics/db/transactions/#controlling-transaction-management-in-views) the decorator example is

from django.db import transaction

@transaction.commit_on_success()
def viewfunc(request):
  ...

The '()' following commit_on_success shouldn't be there. It should be

from django.db import transaction

@transaction.commit_on_success
def viewfunc(request):
  ...

In the actual 'commit_on_success' section (http://docs.djangoproject.com/en/dev/topics/db/transactions/#django.db.transaction.commit_on_success) it is correctly used.

Change History (3)

comment:1 Changed 4 years ago by lrekucki

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by timo

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

In [15923]:

Fixed #15664 - Removed extra parens in commit_on_success example.

comment:3 Changed 4 years ago by timo

In [15924]:

[1.3.X] Fixed #15664 - Removed extra parens in commit_on_success example.

Backport of r15923 from trunk.

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