Opened 13 years ago

Closed 13 years ago

Last modified 13 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: no UI/UX: no

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 by Łukasz Rekucki, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham, 13 years ago

Resolution: fixed
Status: newclosed

In [15923]:

Fixed #15664 - Removed extra parens in commit_on_success example.

comment:3 by Tim Graham, 13 years ago

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