[Django] #25703: Create topic documentation for Expressions

15 views
Skip to first unread message

Django

unread,
Nov 7, 2015, 11:38:18 AM11/7/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
--------------------------------------+--------------------
Reporter: thatdocslady | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
Currently this feature has the following docs:

Conditional Expressions - Reference document that contains descriptions
and examples of conditional expressions
https://docs.djangoproject.com/en/1.8/ref/models/conditional-expressions/

Query Expressions - Full reference about all expressions
https://docs.djangoproject.com/en/1.8/ref/models/expressions/

Proposed new content:

- Overview and benefits of expressions
- Use-case example(s)
- Tutorial (move from ref and expand)
- General guidelines and limitations

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

Django

unread,
Nov 7, 2015, 11:38:30 AM11/7/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by thatdocslady):

* owner: nobody => thatdocslady
* needs_docs: => 0
* status: new => assigned
* needs_tests: => 0
* needs_better_patch: => 0


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

Django

unread,
Nov 7, 2015, 1:37:25 PM11/7/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


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

Django

unread,
Nov 11, 2015, 7:47:19 AM11/11/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by jarshwah):

Thinking about this a little more, I think what we should be writing topic
docs on is "Customising the SQL generated by the ORM". Topic name to be
cleaned up.

That's really the entire point of expressions. They let you customise the
query. Lookups and Transforms also help with customising the query. Extra
and Raw, to a lesser extent, also help with this. I think the topic docs
should make this as their focus.

We can then link to Expressions API docs, Lookup/Transform API docs (of
which there is already topic docs on how to create your own and why), with
a light touch on extra/raw.

Thoughts?

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

Django

unread,
Nov 11, 2015, 7:57:09 AM11/11/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by thatdocslady):

Replying to [comment:3 jarshwah]:


> Thinking about this a little more, I think what we should be writing
topic docs on is "Customising the SQL generated by the ORM". Topic name to
be cleaned up.
>
> That's really the entire point of expressions. They let you customise
the query. Lookups and Transforms also help with customising the query.
Extra and Raw, to a lesser extent, also help with this. I think the topic
docs should make this as their focus.
>
> We can then link to Expressions API docs, Lookup/Transform API docs (of
which there is already topic docs on how to create your own and why), with
a light touch on extra/raw.
>
> Thoughts?

That makes absolute sense, actually. Similar to how we expanded the full-
text search docs to encompass all-things-search, we can approach
expressions from the functional/user perspective. So something like this:

1. Custom SQL operations with the ORM (title WIP) - Overview topic that
builds on the basic SQL topic and tells users what we can offer them to
extend/customize SQL with the ORM.

2. One or more use-case examples of expressions + queries to achieve
specific goals (for example, the reporting you wanted to do). These will
include scenario>goal>SQL snippet>result, much like a tutorial but
lighter.

3. Reference sections for APIs and further reading links as needed.

How does that sound? I'm planning to sprint on this on Sunday at PyCon CZ,
so if you can provide some basic/raw data for it by then, I can flesh it
out and hammer out a draft.

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

Django

unread,
Nov 11, 2015, 8:13:00 AM11/11/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by jarshwah):

I'll try and put something together by then. What exactly are you after?
Use cases, API usage, and SQL (your point 2 above)? What else can help?

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

Django

unread,
Nov 11, 2015, 8:14:36 AM11/11/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by thatdocslady):

Replying to [comment:5 jarshwah]:


> I'll try and put something together by then. What exactly are you after?
Use cases, API usage, and SQL (your point 2 above)? What else can help?

Great, thanks! Other than what you mentioned, it might help to have
links/references to existing basic SQL docs so that I can do a comparison
and build an "upsell" for the extended functionality.

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

Django

unread,
Nov 14, 2015, 6:29:47 PM11/14/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by jarshwah):

Sorry, I haven't had a chance to do very much here. I started writing code
with some comments the other day that I'd planned to circle back to and
write some prose for. Apparently jetlag is a thing though. See attached
what I started with. Hopefully there are some knowledgeable django people
at the sprints that can help out.

Here's where I got to:
https://github.com/jarshwah/expressions_talk/blob/topicdoc/expressions/topicdoc/models.py

Not sure how helpful that's going to be on it's own unfortunately.

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

Django

unread,
Nov 15, 2015, 11:12:51 AM11/15/15
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
-------------------------------------+-------------------------------------
Reporter: thatdocslady | Owner:
Type: | thatdocslady
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by thatdocslady):

Replying to [comment:7 jarshwah]:


> Sorry, I haven't had a chance to do very much here.

You and me both ;) turns out I need to catch up on my ORM lore before I
can tackle this content, but I started researching and will ping you again
soon with NEEDINFO as needed. Cheers!

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

Django

unread,
Sep 15, 2020, 6:02:38 AM9/15/20
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
--------------------------------------+------------------------------------
Reporter: Mikey Ariel | Owner: (none)

Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by felixxm):

* owner: Mikey Ariel => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/25703#comment:9>

Django

unread,
Mar 18, 2024, 3:14:17 AM3/18/24
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
--------------------------------------+------------------------------------
Reporter: Mikey Ariel | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/25703#comment:10>

Django

unread,
Oct 18, 2024, 5:53:51 AM10/18/24
to django-...@googlegroups.com
#25703: Create topic documentation for Expressions
--------------------------------------+------------------------------------
Reporter: Mikey Ariel | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Clifford Gama):

* cc: Clifford Gama (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/25703#comment:11>
Reply all
Reply to author
Forward
0 new messages