Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 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.

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by lrekucki

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

comment:2 Changed 3 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 3 years ago by timo

In [15924]:

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

Backport of r15923 from trunk.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.