Code

Opened 5 years ago

Closed 5 years ago

#10351 closed (duplicate)

Omision from the documentation for Model Instances page

Reported by: dhead@… Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I discovered a surprising omission from the docs today:
http://docs.djangoproject.com/en/dev/ref/models/instances/#ref-models-instances

The following paragraph suggests that delete() would have been documented above it, but only save() is.


Extra instance methods

In addition to save(), delete(), a model object might get any or all of the following methods:


I may be looking in the wrong place but I couldn't find any documentation for the delete() function for model instances in the docs. While it's fairly self explainitory and I've pretty much been able to figure out the answer to my question through experimetation (whether delete() is instant or requires a call to save() to make the change in the DB).

I say this was a suprising ommision because Django's docs are about the best I have used for any bit of software.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

http://docs.djangoproject.com/en/dev/topics/db/queries/#deleting-objects is where delete() is described in detail. Not really sure why it's under "Making Queries", it seems like the model instance reference is a more logical place. However, I haven't sat down and read all through either page, so I'm not sure if it flows better where it is or if it would be better moved over to the instance reference somewhere.

comment:2 Changed 5 years ago by kmtracey

#9503 looks to already cover this.

comment:3 Changed 5 years ago by kmtracey

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

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.