[Django] #27566: Clarify documentation of ModelAdmin.save_model and delete_model

19 views
Skip to first unread message

Django

unread,
Dec 2, 2016, 2:09:07 PM12/2/16
to django-...@googlegroups.com
#27566: Clarify documentation of ModelAdmin.save_model and delete_model
------------------------------------------------+--------------------------
Reporter: Doug Harris | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+--------------------------
When working with `ModelAdmin.save_model()` it wasn't clear to me if these
were meant to be overriden or if they were hooks. If hooks, did they run
before or after save?

The existing documentation say "must save the object" but then also says
"Here you can do any pre- or post-save operations."

I've updated the documentation (in a forthcoming PR) in a way that
clarifies this.

--
Ticket URL: <https://code.djangoproject.com/ticket/27566>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 2, 2016, 3:03:39 PM12/2/16
to django-...@googlegroups.com
#27566: Clarify documentation of ModelAdmin.save_model and delete_model
--------------------------------------+------------------------------------

Reporter: Doug Harris | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/7654 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27566#comment:1>

Django

unread,
Dec 8, 2016, 8:22:34 AM12/8/16
to django-...@googlegroups.com
#27566: Clarify documentation of ModelAdmin.save_model and delete_model
--------------------------------------+------------------------------------

Reporter: Doug Harris | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.10
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"413216fb9fb36c064494fe155effc39e2888161e" 413216fb]:
{{{
#!CommitTicketReference repository=""
revision="413216fb9fb36c064494fe155effc39e2888161e"
Fixed #27566 -- Clarified overriding
ModelAdmin.save_model()/delete_model() docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27566#comment:2>

Django

unread,
Dec 8, 2016, 10:20:07 AM12/8/16
to django-...@googlegroups.com
#27566: Clarify documentation of ModelAdmin.save_model and delete_model
--------------------------------------+------------------------------------

Reporter: Doug Harris | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.10

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"d978b36414da3263ac07cd5a46c6ccf46a00a5fb" d978b364]:
{{{
#!CommitTicketReference repository=""
revision="d978b36414da3263ac07cd5a46c6ccf46a00a5fb"
[1.10.x] Fixed #27566 -- Clarified overriding
ModelAdmin.save_model()/delete_model() docs.

Backport of 413216fb9fb36c064494fe155effc39e2888161e from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27566#comment:3>

Reply all
Reply to author
Forward
0 new messages