[Django] #30326: Document how to avoid F() assignments persistence

15 views
Skip to first unread message

Django

unread,
Apr 4, 2019, 12:01:30 AM4/4/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: | Version: master
Documentation | Keywords: documentation,
Severity: Normal | models, expressions
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
In `F()` expressions documentation, it nicely explains that
[https://docs.djangoproject.com/en/2.1/ref/models/expressions/#f
-assignments-persist-after-model-save F() assignments persist after
Model.save()]. However, it does not explain how to avoid this persistence
after we're done using the expression (which can be done by reloading the
object). I think it'll be helpful to add this information in the docs.

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

Django

unread,
Apr 5, 2019, 3:41:25 AM4/5/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: documentation, | Triage Stage: Accepted
models, expressions |
Has patch: 0 | Needs documentation: 0

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

* stage: Unreviewed => Accepted


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

Django

unread,
Apr 5, 2019, 7:40:30 AM4/5/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: sage
Type: | Status: assigned

Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: documentation, | Triage Stage: Accepted
models, expressions |
Has patch: 0 | Needs documentation: 0

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

* status: new => assigned
* owner: nobody => sage


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

Django

unread,
Apr 12, 2019, 10:25:32 PM4/12/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: sage
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: documentation, | Triage Stage: Accepted
models, expressions |
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Apr 14, 2019, 5:14:27 AM4/14/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: sage
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: documentation, | Triage Stage: Accepted
models, expressions |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Bell):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30326#comment:4>

Django

unread,
Apr 14, 2019, 7:45:10 AM4/14/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: sage
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: documentation, | Triage Stage: Accepted
models, expressions |
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/30326#comment:5>

Django

unread,
Apr 14, 2019, 7:45:40 AM4/14/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: sage
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: documentation, | Triage Stage: Ready for
models, expressions | checkin
Has patch: 1 | Needs documentation: 0

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

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/30326#comment:6>

Django

unread,
Apr 15, 2019, 3:14:28 AM4/15/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: sage
Type: | Status: closed

Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: documentation, | Triage Stage: Ready for
models, expressions | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"bfae195b0a2c8dae755610a7e23add5c6bc37b5e" bfae195b]:
{{{
#!CommitTicketReference repository=""
revision="bfae195b0a2c8dae755610a7e23add5c6bc37b5e"
Fixed #30326 -- Doc'd how to avoid persistence of F() assignment.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30326#comment:7>

Django

unread,
Apr 15, 2019, 3:14:46 AM4/15/19
to django-...@googlegroups.com
#30326: Document how to avoid F() assignments persistence
-------------------------------------+-------------------------------------
Reporter: sage | Owner: sage
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: documentation, | Triage Stage: Ready for
models, expressions | checkin
Has patch: 1 | Needs documentation: 0

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

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"86de106864508872a3f5f1f24b2ceae4c6a3770f" 86de1068]:
{{{
#!CommitTicketReference repository=""
revision="86de106864508872a3f5f1f24b2ceae4c6a3770f"
[2.2.x] Fixed #30326 -- Doc'd how to avoid persistence of F() assignment.

Backport of bfae195b0a2c8dae755610a7e23add5c6bc37b5e from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30326#comment:8>

Reply all
Reply to author
Forward
0 new messages