Opened 6 years ago

Closed 6 years ago

Last modified 6 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 6 years ago by Łukasz Rekucki

Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Tim Graham

Resolution: fixed
Status: newclosed

In [15923]:

Fixed #15664 - Removed extra parens in commit_on_success example.

comment:3 Changed 6 years ago by Tim Graham

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